mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
Lazily load onboarding to reduce chunk size
This commit is contained in:
parent
3136aefbf1
commit
7cec27175a
@ -3,7 +3,6 @@ import { Routes, Route } from "react-router-dom";
|
||||
import { AppProviders } from "@app/components/AppProviders";
|
||||
import { AppLayout } from "@app/components/AppLayout";
|
||||
import { LoadingFallback } from "@app/components/shared/LoadingFallback";
|
||||
import Onboarding from "@app/components/onboarding/Onboarding";
|
||||
|
||||
// Lazy-load auth routes - only loaded when user navigates to them
|
||||
const Landing = lazy(() => import("@app/routes/Landing"));
|
||||
@ -12,6 +11,9 @@ const Signup = lazy(() => import("@app/routes/Signup"));
|
||||
const AuthCallback = lazy(() => import("@app/routes/AuthCallback"));
|
||||
const InviteAccept = lazy(() => import("@app/routes/InviteAccept"));
|
||||
|
||||
// Lazy-load Onboarding - only shown once for first-time users
|
||||
const Onboarding = lazy(() => import("@app/components/onboarding/Onboarding"));
|
||||
|
||||
// Import global styles
|
||||
import "@app/styles/tailwind.css";
|
||||
import "@app/styles/cookieconsent.css";
|
||||
@ -36,7 +38,9 @@ export default function App() {
|
||||
{/* Main app routes - Landing handles auth logic */}
|
||||
<Route path="/*" element={<Landing />} />
|
||||
</Routes>
|
||||
<Onboarding />
|
||||
<Suspense fallback={null}>
|
||||
<Onboarding />
|
||||
</Suspense>
|
||||
</AppLayout>
|
||||
</AppProviders>
|
||||
</Suspense>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user