diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx deleted file mode 100644 index 1c9a2c1..0000000 --- a/src/routes/__root.tsx +++ /dev/null @@ -1,130 +0,0 @@ -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { - Outlet, - Link, - createRootRouteWithContext, - useRouter, - HeadContent, - Scripts, -} from "@tanstack/react-router"; -import { useEffect, type ReactNode } from "react"; - -import appCss from "../styles.css?url"; -import { reportLovableError } from "../lib/lovable-error-reporting"; -import { Toaster } from "@/components/ui/sonner"; - -function NotFoundComponent() { - return ( -
-
-

404

-

Page not found

-

- The page you're looking for doesn't exist or has been moved. -

-
- - Go home - -
-
-
- ); -} - -function ErrorComponent({ error, reset }: { error: Error; reset: () => void }) { - console.error(error); - const router = useRouter(); - useEffect(() => { - reportLovableError(error, { boundary: "tanstack_root_error_component" }); - }, [error]); - - return ( -
-
-

- This page didn't load -

-

- Something went wrong on our end. You can try refreshing or head back home. -

-
- - - Go home - -
-
-
- ); -} - -export const Route = createRootRouteWithContext<{ queryClient: QueryClient }>()({ - head: () => ({ - meta: [ - { charSet: "utf-8" }, - { name: "viewport", content: "width=device-width, initial-scale=1" }, - { title: "Lovable App" }, - { name: "description", content: "Family Hub Connect is a secure, password-protected website for sharing information among administrators, teachers, and parents." }, - { name: "author", content: "Lovable" }, - { property: "og:title", content: "Lovable App" }, - { property: "og:description", content: "Family Hub Connect is a secure, password-protected website for sharing information among administrators, teachers, and parents." }, - { property: "og:type", content: "website" }, - { name: "twitter:card", content: "summary" }, - { name: "twitter:site", content: "@Lovable" }, - { name: "twitter:title", content: "Lovable App" }, - { name: "twitter:description", content: "Family Hub Connect is a secure, password-protected website for sharing information among administrators, teachers, and parents." }, - { property: "og:image", content: "https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/52c63504-4e5d-460e-9bc4-f678f57cf953/id-preview-eae5ad88--b788ff84-5057-474e-bba5-3b0a00357c06.lovable.app-1782852403642.png" }, - { name: "twitter:image", content: "https://pub-bb2e103a32db4e198524a2e9ed8f35b4.r2.dev/52c63504-4e5d-460e-9bc4-f678f57cf953/id-preview-eae5ad88--b788ff84-5057-474e-bba5-3b0a00357c06.lovable.app-1782852403642.png" }, - ], - links: [ - { - rel: "stylesheet", - href: appCss, - }, - ], - }), - shellComponent: RootShell, - component: RootComponent, - notFoundComponent: NotFoundComponent, - errorComponent: ErrorComponent, -}); - -function RootShell({ children }: { children: ReactNode }) { - return ( - - - - - - {children} - - - - ); -} - -function RootComponent() { - const { queryClient } = Route.useRouteContext(); - - return ( - - - - - ); -}