From bee5cefc79f45067eae6ecf3b70f84d592706274 Mon Sep 17 00:00:00 2001 From: Piotr Rogowski Date: Fri, 28 Oct 2022 15:27:49 +0200 Subject: [PATCH] Remove unused, lazy load logs --- src/App.tsx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index ab6a8d6..d3bd0ba 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -23,7 +23,6 @@ import StatusBar from './components/StatusBar'; import { Routes } from './routes'; import { loadTune } from './utils/api'; import store from './store'; -import Logs from './pages/Logs'; import Loader from './components/Loader'; import { AppState, @@ -42,9 +41,8 @@ import './css/App.less'; // TODO: fix this // lazy loading this component causes a weird Curve canvas scaling -// const Log = lazy(() => import('./pages/Log')); - const Tune = lazy(() => import('./pages/Tune')); +const Logs = lazy(() => import('./pages/Logs')); const Diagnose = lazy(() => import('./pages/Diagnose')); const Upload = lazy(() => import('./pages/Upload')); const Login = lazy(() => import('./pages/auth/Login')); @@ -68,10 +66,6 @@ const App = ({ ui, navigation, tuneData }: { ui: UIState, navigation: Navigation const { getTune } = useDb(); const [isLoading, setIsLoading] = useState(false); const navigate = useNavigate(); - - // const [lastDialogPath, setLastDialogPath] = useState(); - // const lastDialogPath = storageGetSync('lastDialog'); - const tunePathMatch = useMatch(`${Routes.TUNE_ROOT}/*`); const tuneId = tunePathMatch?.params.tuneId; @@ -113,14 +107,6 @@ const App = ({ ui, navigation, tuneData }: { ui: UIState, navigation: Navigation store.dispatch({ type: 'navigation/tuneId', payload: tuneId }); } - // storageGet('lastDialog') - // .then((path) => setLastDialogPath(path)); - - // window.addEventListener('beforeunload', beforeUnload); - // return () => { - // window.removeEventListener('beforeunload', beforeUnload); - // }; - // eslint-disable-next-line react-hooks/exhaustive-deps }, [tuneId]);