Skip to content

Commit

Permalink
Fix reloading on viewport size change (#6005)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolflu05 authored Nov 30, 2023
1 parent e4c5bfc commit 0cd66fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ function checkMobile() {
return false;
}

const MobileAppView = Loadable(lazy(() => import('./views/MobileAppView')));
const DesktopAppView = Loadable(lazy(() => import('./views/DesktopAppView')));

// Main App
export default function App() {
// Check if mobile
if (checkMobile()) {
const MobileAppView = Loadable(lazy(() => import('./views/MobileAppView')));
return <MobileAppView />;
}

// Main App component
const DesktopAppView = Loadable(lazy(() => import('./views/DesktopAppView')));
return <DesktopAppView />;
}

0 comments on commit 0cd66fd

Please sign in to comment.