perf(react): remove lazy imports again
This commit is contained in:
parent
d88c554a2d
commit
e0c2331af3
8 changed files with 82 additions and 121 deletions
|
|
@ -1,20 +1,30 @@
|
|||
import { lazy } from "react";
|
||||
import { settingsNavigation } from "./navigation";
|
||||
|
||||
import SettingsIndex from "./pages/index";
|
||||
import Profile from "./pages/profile";
|
||||
import Security from "./pages/security";
|
||||
import Chat from "./pages/chat";
|
||||
import Call from "./pages/call";
|
||||
import Cache from "./pages/cache";
|
||||
import Theme from "./pages/theme";
|
||||
import Accessibility from "./pages/accessibility";
|
||||
import Hotkeys from "./pages/hotkeys";
|
||||
import Licenses from "./pages/licenses";
|
||||
|
||||
const pageComponents = {
|
||||
profile: lazy(() => import("./pages/profile")),
|
||||
security: lazy(() => import("./pages/security")),
|
||||
chat: lazy(() => import("./pages/chat")),
|
||||
call: lazy(() => import("./pages/call")),
|
||||
cache: lazy(() => import("./pages/cache")),
|
||||
theme: lazy(() => import("./pages/theme")),
|
||||
accessibility: lazy(() => import("./pages/accessibility")),
|
||||
hotkeys: lazy(() => import("./pages/hotkeys")),
|
||||
licenses: lazy(() => import("./pages/licenses")),
|
||||
profile: Profile,
|
||||
security: Security,
|
||||
chat: Chat,
|
||||
call: Call,
|
||||
cache: Cache,
|
||||
theme: Theme,
|
||||
accessibility: Accessibility,
|
||||
hotkeys: Hotkeys,
|
||||
licenses: Licenses,
|
||||
} as const;
|
||||
|
||||
export const settingsPages = [
|
||||
{ path: "/", component: lazy(() => import("./pages/index")) },
|
||||
{ path: "/", component: SettingsIndex },
|
||||
...settingsNavigation.map((page) => ({
|
||||
...page,
|
||||
component: pageComponents[page.path],
|
||||
|
|
|
|||
Loading…
Reference in a new issue