From 5246af4ae9042344d5bb519f4d9238208dc6e15a Mon Sep 17 00:00:00 2001
From: Lim Chee Aun <cheeaun@gmail.com>
Date: Wed, 3 Apr 2024 14:33:19 +0800
Subject: [PATCH] Undo lazy component experiment

Doesn't make much difference
---
 src/app.jsx | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/src/app.jsx b/src/app.jsx
index c9b7c36a..1b18093f 100644
--- a/src/app.jsx
+++ b/src/app.jsx
@@ -1,7 +1,6 @@
 import './app.css';
 
 import debounce from 'just-debounce-it';
-import { lazy, Suspense } from 'preact/compat';
 import {
   useEffect,
   useLayoutEffect,
@@ -18,14 +17,14 @@ import ComposeButton from './components/compose-button';
 import { ICONS } from './components/ICONS';
 import KeyboardShortcutsHelp from './components/keyboard-shortcuts-help';
 import Loader from './components/loader';
-// import Modals from './components/modals';
+import Modals from './components/modals';
 import NotificationService from './components/notification-service';
 import SearchCommand from './components/search-command';
 import Shortcuts from './components/shortcuts';
 import NotFound from './pages/404';
 import AccountStatuses from './pages/account-statuses';
 import Bookmarks from './pages/bookmarks';
-// import Catchup from './pages/catchup';
+import Catchup from './pages/catchup';
 import Favourites from './pages/favourites';
 import Filters from './pages/filters';
 import FollowedHashtags from './pages/followed-hashtags';
@@ -57,9 +56,6 @@ import store from './utils/store';
 import { getCurrentAccount } from './utils/store-utils';
 import './utils/toast-alert';
 
-const Catchup = lazy(() => import('./pages/catchup'));
-const Modals = lazy(() => import('./components/modals'));
-
 window.__STATES__ = states;
 window.__STATES_STATS__ = () => {
   const keys = [
@@ -387,9 +383,7 @@ function App() {
       )}
       {isLoggedIn && <ComposeButton />}
       {isLoggedIn && <Shortcuts />}
-      <Suspense>
-        <Modals />
-      </Suspense>
+      <Modals />
       {isLoggedIn && <NotificationService />}
       <BackgroundService isLoggedIn={isLoggedIn} />
       {uiState !== 'loading' && <SearchCommand onClose={focusDeck} />}
@@ -466,14 +460,7 @@ function SecondaryRoutes({ isLoggedIn }) {
           </Route>
           <Route path="/fh" element={<FollowedHashtags />} />
           <Route path="/ft" element={<Filters />} />
-          <Route
-            path="/catchup"
-            element={
-              <Suspense>
-                <Catchup />
-              </Suspense>
-            }
-          />
+          <Route path="/catchup" element={<Catchup />} />
         </>
       )}
       <Route path="/:instance?/t/:hashtag" element={<Hashtag />} />