add loading page

This commit is contained in:
2026-06-11 15:06:13 +02:00
parent 98a5bb742b
commit f4b9820b5b
6 changed files with 47 additions and 7 deletions
+3 -1
View File
@@ -3,7 +3,8 @@ import { createRootRoute, HeadContent, Scripts } from "@tanstack/react-router";
import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools";
import { type ReactNode, Suspense } from "react";
import { ToastContainer } from "react-toastify";
import GenericErrorView from "#/components/Error/GenericErrorView.tsx";
import GenericErrorView from "#/components/GenericErrorView.tsx";
import LoadingView from "#/components/LoadingView.tsx";
import { MatomoAnalytics } from "#/components/MatomoAnalytics.tsx";
import { LichessUserProvider } from "#/context/LichessUserContext.tsx";
import Footer from "../components/Footer";
@@ -45,6 +46,7 @@ export const Route = createRootRoute({
}),
shellComponent: RootDocument,
errorComponent: ({ error }) => <GenericErrorView error={error} />,
pendingComponent: () => <LoadingView />,
});
function RootDocument({ children }: { children: ReactNode }) {