Template
1
0
Files
boilerplate/apps/react/src/routes.tsx
2025-11-23 22:56:58 +01:00

31 lines
701 B
TypeScript

import { createRootRoute, createRoute } from "@tanstack/react-router";
import { AppView } from "./views/app.view.tsx";
import { CallbackView } from "./views/auth/callback.view.tsx";
import { DashboardView } from "./views/dashboard/dashboard.view.tsx";
const root = createRootRoute();
const callback = createRoute({
getParentRoute: () => root,
path: "/callback",
component: CallbackView,
});
const app = createRoute({
id: "app",
getParentRoute: () => root,
component: AppView,
});
const dashboard = createRoute({
getParentRoute: () => app,
path: "/",
component: DashboardView,
});
root.addChildren([app, callback]);
app.addChildren([dashboard]);
export const routeTree = root;