Unify routers and use lazy for app layouts
This commit is contained in:
@@ -15,7 +15,7 @@ import AppDrawer, { isDrawerPath } from './components/drawers/AppDrawer';
|
||||
|
||||
import './AppOverrides.scss';
|
||||
|
||||
const AppLayout = () => {
|
||||
export const Component = () => {
|
||||
const [ isDrawerActive, setIsDrawerActive ] = useState(false);
|
||||
const { user } = useApi();
|
||||
const location = useLocation();
|
||||
@@ -76,5 +76,3 @@ const AppLayout = () => {
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default AppLayout;
|
||||
|
||||
@@ -8,8 +8,6 @@ import { toViewManagerPageRoute } from 'components/router/LegacyRoute';
|
||||
import { toRedirectRoute } from 'components/router/Redirect';
|
||||
import ErrorBoundary from 'components/router/ErrorBoundary';
|
||||
|
||||
import AppLayout from '../AppLayout';
|
||||
|
||||
import { ASYNC_USER_ROUTES } from './asyncRoutes';
|
||||
import { LEGACY_PUBLIC_ROUTES, LEGACY_USER_ROUTES } from './legacyRoutes';
|
||||
import VideoPage from './video';
|
||||
@@ -17,7 +15,7 @@ import VideoPage from './video';
|
||||
export const EXPERIMENTAL_APP_ROUTES: RouteObject[] = [
|
||||
{
|
||||
path: '/*',
|
||||
element: <AppLayout />,
|
||||
lazy: () => import('../AppLayout'),
|
||||
children: [
|
||||
{
|
||||
/* User routes: Any child route of this layout is authenticated */
|
||||
|
||||
Reference in New Issue
Block a user