mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-05 16:33:36 +00:00
Lazy load page components
This commit is contained in:
4 files changed
+23
-4
No files matched your search
+5
-3
@@ -1,9 +1,11 @@
|
||||
import { lazy } from "react";
|
||||
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
||||
|
||||
import Index from "./pages/Index";
|
||||
import NotFound from "./pages/NotFound";
|
||||
import { ScrollToTop } from "./components/ScrollToTop";
|
||||
|
||||
// Lazy load page components
|
||||
const Index = lazy(() => import("./pages/Index"));
|
||||
const NotFound = lazy(() => import("./pages/NotFound"));
|
||||
|
||||
export function AppRouter() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
|
||||
Reference in new issue
Block a user