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