mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix reloading on viewport size change (#6005)
This commit is contained in:
parent
e4c5bfc2fe
commit
0cd66fd16c
@ -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 />;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user