Some checks failed
CI / build-and-test (pull_request) Has been cancelled
- RaceDetailsPage: show all non-null fields (officialUrl, startTime, clusterSchedule, bibPickup) - RaceDetailsPage: add edit link and delete button with confirmation banner - RaceFormPage: universal create/edit form with validation, auto-generated id for new races - Router: add /races/new and /races/:raceId/edit routes - AppLayout: add navigation link to create new race - CSS: buttons (primary/secondary/danger), form fields, confirm banner, responsive layout Made-with: Cursor
21 lines
734 B
TypeScript
21 lines
734 B
TypeScript
import { createBrowserRouter } from "react-router-dom";
|
|
import { AppLayout } from "./layouts/AppLayout";
|
|
import { DashboardPage } from "../pages/DashboardPage";
|
|
import { RacesPage } from "../pages/RacesPage";
|
|
import { RaceDetailsPage } from "../pages/RaceDetailsPage";
|
|
import { RaceFormPage } from "../pages/RaceFormPage";
|
|
|
|
export const appRouter = createBrowserRouter([
|
|
{
|
|
path: "/",
|
|
element: <AppLayout />,
|
|
children: [
|
|
{ index: true, element: <DashboardPage /> },
|
|
{ path: "races", element: <RacesPage /> },
|
|
{ path: "races/new", element: <RaceFormPage /> },
|
|
{ path: "races/:raceId", element: <RaceDetailsPage /> },
|
|
{ path: "races/:raceId/edit", element: <RaceFormPage /> },
|
|
],
|
|
},
|
|
]);
|