2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-09 16:58:49 +00:00

Fix reloading on viewport size change (#6005)

This commit is contained in:
Lukas 2023-11-30 05:53:32 +01:00 committed by GitHub
parent e4c5bfc2fe
commit 0cd66fd16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,15 +25,16 @@ function checkMobile() {
return false; return false;
} }
const MobileAppView = Loadable(lazy(() => import('./views/MobileAppView')));
const DesktopAppView = Loadable(lazy(() => import('./views/DesktopAppView')));
// Main App // Main App
export default function App() { export default function App() {
// Check if mobile // Check if mobile
if (checkMobile()) { if (checkMobile()) {
const MobileAppView = Loadable(lazy(() => import('./views/MobileAppView')));
return <MobileAppView />; return <MobileAppView />;
} }
// Main App component // Main App component
const DesktopAppView = Loadable(lazy(() => import('./views/DesktopAppView')));
return <DesktopAppView />; return <DesktopAppView />;
} }