diff --git a/packages/app/src/Pages/DeckLayout.tsx b/packages/app/src/Pages/DeckLayout.tsx index 3b7c59f5c..6b957664c 100644 --- a/packages/app/src/Pages/DeckLayout.tsx +++ b/packages/app/src/Pages/DeckLayout.tsx @@ -1,5 +1,5 @@ import "./Deck.css"; -import { CSSProperties, createContext, useContext, useEffect, useState } from "react"; +import { CSSProperties, createContext, useContext, useEffect, useState, lazy } from "react"; import { Outlet, useNavigate } from "react-router-dom"; import { FormattedMessage } from "react-intl"; import { NostrLink, TaggedNostrEvent } from "@snort/system"; @@ -12,7 +12,6 @@ import Articles from "@/Element/Deck/Articles"; import TimelineFollows from "@/Element/Feed/TimelineFollows"; import { transformTextCached } from "@/Hooks/useTextTransformCache"; import Icon from "@/Icons/Icon"; -import NotificationsPage from "./Notifications"; import useImgProxy from "@/Hooks/useImgProxy"; import Modal from "@/Element/Modal"; import { Thread } from "@/Element/Event/Thread"; @@ -23,6 +22,8 @@ import Toaster from "@/Toaster"; import useLogin from "@/Hooks/useLogin"; import { LongFormText } from "@/Element/Event/LongFormText"; +const NotificationsPage = lazy(() => import("@/Pages/Notifications")); + type Cols = "notes" | "articles" | "media" | "streams" | "notifications"; interface DeckState { diff --git a/packages/app/src/index.tsx b/packages/app/src/index.tsx index b3696b87a..05db901be 100644 --- a/packages/app/src/index.tsx +++ b/packages/app/src/index.tsx @@ -28,6 +28,7 @@ import { removeUndefined, throwIfOffline } from "@snort/shared"; import { lazy, Suspense } from "react"; const NetworkGraph = lazy(() => import("@/Pages/NetworkGraph")); +const NotificationsPage = lazy(() => import("@/Pages/Notifications")); import * as serviceWorkerRegistration from "@/serviceWorkerRegistration"; import { IntlProvider } from "@/IntlProvider"; @@ -35,7 +36,6 @@ import { getCountry, unwrap } from "@/SnortUtils"; import Layout from "@/Pages/Layout"; import ProfilePage from "@/Pages/Profile/ProfilePage"; import { RootRoutes, RootTabRoutes } from "@/Pages/Root"; -import NotificationsPage from "@/Pages/Notifications"; import SettingsPage, { SettingsRoutes } from "@/Pages/SettingsPage"; import ErrorPage from "@/Pages/ErrorPage"; import NostrAddressPage from "@/Pages/NostrAddressPage";