2026-02-05 18:36:19 +01:00
|
|
|
import { Routes, Route, Navigate } from 'react-router-dom'
|
2026-02-04 17:13:58 +01:00
|
|
|
import { Layout } from './components'
|
2026-02-05 18:36:19 +01:00
|
|
|
import { AdminLayout } from './components/admin'
|
2026-02-07 20:46:36 +01:00
|
|
|
import { Home, NewRun, RunList, RunEncounters, Stats } from './pages'
|
Improve admin panel UX with toasts, evolution CRUD, sorting, drag-and-drop, and responsive layout
Add sonner toast notifications to all mutations, evolution management backend
(CRUD endpoints with search/pagination) and frontend (form modal with pokemon
selector, paginated list page), sortable AdminTable columns (Region/Gen/Year
on Games), drag-and-drop route reordering via @dnd-kit, skeleton loading states,
card-styled table wrappers, and responsive mobile nav in AdminLayout.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 13:09:27 +01:00
|
|
|
import {
|
|
|
|
|
AdminGames,
|
|
|
|
|
AdminGameDetail,
|
|
|
|
|
AdminPokemon,
|
|
|
|
|
AdminRouteDetail,
|
|
|
|
|
AdminEvolutions,
|
|
|
|
|
} from './pages/admin'
|
2026-02-04 17:13:58 +01:00
|
|
|
|
|
|
|
|
function App() {
|
|
|
|
|
return (
|
|
|
|
|
<Routes>
|
|
|
|
|
<Route path="/" element={<Layout />}>
|
|
|
|
|
<Route index element={<Home />} />
|
2026-02-05 15:28:50 +01:00
|
|
|
<Route path="runs" element={<RunList />} />
|
2026-02-05 15:09:25 +01:00
|
|
|
<Route path="runs/new" element={<NewRun />} />
|
2026-02-07 14:20:26 +01:00
|
|
|
<Route path="runs/:runId" element={<RunEncounters />} />
|
2026-02-07 20:46:36 +01:00
|
|
|
<Route path="stats" element={<Stats />} />
|
2026-02-07 14:20:26 +01:00
|
|
|
<Route path="runs/:runId/encounters" element={<Navigate to=".." relative="path" replace />} />
|
2026-02-05 18:36:19 +01:00
|
|
|
<Route path="admin" element={<AdminLayout />}>
|
|
|
|
|
<Route index element={<Navigate to="/admin/games" replace />} />
|
|
|
|
|
<Route path="games" element={<AdminGames />} />
|
|
|
|
|
<Route path="games/:gameId" element={<AdminGameDetail />} />
|
|
|
|
|
<Route path="games/:gameId/routes/:routeId" element={<AdminRouteDetail />} />
|
|
|
|
|
<Route path="pokemon" element={<AdminPokemon />} />
|
Improve admin panel UX with toasts, evolution CRUD, sorting, drag-and-drop, and responsive layout
Add sonner toast notifications to all mutations, evolution management backend
(CRUD endpoints with search/pagination) and frontend (form modal with pokemon
selector, paginated list page), sortable AdminTable columns (Region/Gen/Year
on Games), drag-and-drop route reordering via @dnd-kit, skeleton loading states,
card-styled table wrappers, and responsive mobile nav in AdminLayout.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 13:09:27 +01:00
|
|
|
<Route path="evolutions" element={<AdminEvolutions />} />
|
2026-02-05 18:36:19 +01:00
|
|
|
</Route>
|
2026-02-04 17:13:58 +01:00
|
|
|
</Route>
|
|
|
|
|
</Routes>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App
|