2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-23 15:20:55 +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

View File

@ -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 />;
}