frontend/src/pages/Router.tsx
Rodrigo Verdiani dd41f10234
All checks were successful
ci/woodpecker/push/pipeline Pipeline was successful
feature(import): add import review page and card components
2025-10-30 16:16:14 -03:00

52 lines
1.0 KiB
TypeScript

import { lazy } from "react";
import { createBrowserRouter } from "react-router";
import { AppLayout } from "@/components/Layout/AppLayout.tsx";
const Home = lazy(() => import("./Home.tsx"));
const ImportReview = lazy(() => import("./ImportReview.tsx"));
const Manga = lazy(() => import("./Manga.tsx"));
const Chapter = lazy(() => import("./Chapter.tsx"));
const Login = lazy(() => import("./Login.tsx"));
const Register = lazy(() => import("./Register.tsx"));
export const Router = createBrowserRouter([
{
element: <AppLayout />,
children: [
{
path: "*",
element: <div>Not Found!</div>,
},
{
index: true,
element: <Home />,
},
{
path: "/login",
element: <Login />,
},
{
path: "/register",
element: <Register />,
},
{
path: "/import-review",
element: <ImportReview />,
},
{
path: "/manga",
children: [
{
path: ":mangaId",
element: <Manga />,
},
{
path: ":mangaId/chapter/:chapterId",
element: <Chapter />,
},
],
},
],
},
]);