29 lines
861 B
TypeScript
29 lines
861 B
TypeScript
import { QueryClient } from "@tanstack/react-query";
|
|
import { createRootRouteWithContext, Outlet } from "@tanstack/react-router";
|
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
|
import { TanStackRouterDevtools } from "@tanstack/router-devtools";
|
|
import { Toaster } from "@/components/ui/toaster";
|
|
import GeneralError from "@/pages/errors/general-error";
|
|
import NotFoundError from "@/pages/errors/not-found-error";
|
|
|
|
export const Route = createRootRouteWithContext<{
|
|
queryClient: QueryClient;
|
|
}>()({
|
|
component: () => {
|
|
return (
|
|
<>
|
|
<Outlet />
|
|
<Toaster />
|
|
{import.meta.env.MODE === "development" && (
|
|
<>
|
|
<ReactQueryDevtools buttonPosition="bottom-left" />
|
|
<TanStackRouterDevtools position="bottom-right" />
|
|
</>
|
|
)}
|
|
</>
|
|
);
|
|
},
|
|
notFoundComponent: NotFoundError,
|
|
errorComponent: GeneralError
|
|
});
|