import { Outlet } from 'umi';
import './index.less';
import { useSearchParams } from 'umi';
import { useEffect } from 'react';

export default function Layout() {
  const [searchParams] = useSearchParams();

  useEffect(() => {
    const enterpriseCode = searchParams.get('enterpriseCode');
  
    if(enterpriseCode) {
      sessionStorage.setItem('enterpriseCode', enterpriseCode);
    }
  }, [searchParams]);
  return (
    <Outlet />
  );
}
