Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { createRootRouteWithContext, Outlet } from "@tanstack/react-router";
- import { TanStackRouterDevtools } from "@tanstack/router-devtools";
- import Footer from "../components/Footer";
- import ErrorPage from "../pages/error/index.lazy";
- import { AuthSlice } from "../store/auth-slice";
- interface MainRouterContext {
- // The ReturnType of your useAuth hook or the value of your AuthContext
- auth: AuthSlice;
- }
- export const Route = createRootRouteWithContext<MainRouterContext>()({
- component: () => (
- <>
- <Outlet />
- <Footer />
- <TanStackRouterDevtools position='top-right' />
- </>
- ),
- notFoundComponent: () => <ErrorPage errorType={404} />,
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement