diff --git a/src/app/components/Routes/Routes.tsx b/src/app/components/Routes/Routes.tsx index 038b20ee..d3b647cd 100644 --- a/src/app/components/Routes/Routes.tsx +++ b/src/app/components/Routes/Routes.tsx @@ -2,19 +2,20 @@ import React from 'react'; import { Routes as ReactRouterRoutes, Route } from 'react-router-dom'; import { ROUTES } from '../../../constants'; -import { AdHocView } from '../../../pages/AdHocView/AdHocView'; -import { ProfilesExplorerView } from '../../../pages/ProfilesExplorerView/ProfilesExplorerView'; -import { SettingsView } from '../../../pages/SettingsView/SettingsView'; import { useNavigationLinksUpdate } from './domain/useNavigationLinksUpdate'; +const ProfilesExplorerView = React.lazy(() => import('../../../pages/ProfilesExplorerView/ProfilesExplorerView')); +const AdHocView = React.lazy(() => import('../../../pages/AdHocView/AdHocView')); +const SettingsView = React.lazy(() => import('../../../pages/SettingsView/SettingsView')); + export function Routes() { useNavigationLinksUpdate(); return ( - } /> - } /> - } /> + } /> + } /> + } /> {/* Default Route */} } /> diff --git a/src/pages/AdHocView/AdHocView.tsx b/src/pages/AdHocView/AdHocView.tsx index ce34f27d..9a6b9f48 100644 --- a/src/pages/AdHocView/AdHocView.tsx +++ b/src/pages/AdHocView/AdHocView.tsx @@ -3,7 +3,7 @@ import React from 'react'; import { AdHocTabs } from './ui/AdHocTabs'; -export function AdHocView() { +export default function AdHocView() { return ( <> diff --git a/src/pages/ProfilesExplorerView/ProfilesExplorerView.tsx b/src/pages/ProfilesExplorerView/ProfilesExplorerView.tsx index 1ad110d4..56992267 100644 --- a/src/pages/ProfilesExplorerView/ProfilesExplorerView.tsx +++ b/src/pages/ProfilesExplorerView/ProfilesExplorerView.tsx @@ -2,7 +2,7 @@ import React, { useMemo } from 'react'; import { SceneProfilesExplorer } from './components/SceneProfilesExplorer/SceneProfilesExplorer'; -export function ProfilesExplorerView() { +export default function ProfilesExplorerView() { const sceneProfilesExplorer = useMemo(() => new SceneProfilesExplorer(), []); return ; diff --git a/src/pages/SettingsView/SettingsView.tsx b/src/pages/SettingsView/SettingsView.tsx index d9730d26..18c747cc 100644 --- a/src/pages/SettingsView/SettingsView.tsx +++ b/src/pages/SettingsView/SettingsView.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { useSettingsView } from './domain/useSettingsView'; -export function SettingsView() { +export default function SettingsView() { const styles = useStyles2(getStyles); const { data, actions } = useSettingsView();