From 0772a9a8e710d2ab1f26e13217248bbe63ee00cf Mon Sep 17 00:00:00 2001 From: Adam Doyle Date: Tue, 15 Oct 2024 22:19:39 -0400 Subject: [PATCH] use lazy loading --- clients/solid/src/App.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clients/solid/src/App.tsx b/clients/solid/src/App.tsx index 9367841..c56f39d 100644 --- a/clients/solid/src/App.tsx +++ b/clients/solid/src/App.tsx @@ -1,6 +1,6 @@ import type { JSXElement } from "solid-js"; +import { lazy } from "solid-js"; import { ColorModeProvider, ColorModeScript } from "@kobalte/core"; -import { Separator } from "@/components/ui/separator"; import { Tabs, TabsContent, @@ -9,10 +9,11 @@ import { TabsTrigger, } from "@/components/ui/tabs"; import Home from "@/pages/Home"; -import Browser from "@/pages/Browser"; -import Game from "@/pages/Game"; import Footer from "@/components/Footer"; +const Browser = lazy(() => import("@/pages/Browser")); +const Game = lazy(() => import("@/pages/Game")); + export default function App(): JSXElement { return ( <>