← full-stack-fastapi-template  /  frontend/src/routes/__root.tsx

1
import { ReactQueryDevtools } from "@tanstack/react-query-devtools"
2
import { createRootRoute, HeadContent, Outlet } from "@tanstack/react-router"
3
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools"
4
import ErrorComponent from "@/components/Common/ErrorComponent"
5
import NotFound from "@/components/Common/NotFound"
6
7
export const Route = createRootRoute({
8
  component: () => (
9
    <>
10
      <HeadContent />
11
      <Outlet />
12
      <TanStackRouterDevtools position="bottom-right" />
13
      <ReactQueryDevtools initialIsOpen={false} />
14
    </>
15
  ),
16
  notFoundComponent: () => <NotFound />,
17
  errorComponent: () => <ErrorComponent />,
18
})
19