Add stats screen with backend endpoint and frontend page
Implements a dedicated /stats page showing cross-run aggregate statistics: run overview with win rate, runs by game bar chart, encounter breakdowns, top caught/encountered pokemon rankings, mortality analysis with death causes, and type distribution. Backend endpoint uses aggregate SQL queries to avoid N+1 fetching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,12 @@ export function Layout() {
|
||||
>
|
||||
My Runs
|
||||
</Link>
|
||||
<Link
|
||||
to="/stats"
|
||||
className="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-100 dark:hover:bg-gray-700"
|
||||
>
|
||||
Stats
|
||||
</Link>
|
||||
<Link
|
||||
to="/admin"
|
||||
className="px-3 py-2 rounded-md text-sm font-medium hover:bg-gray-100 dark:hover:bg-gray-700"
|
||||
@@ -87,6 +93,13 @@ export function Layout() {
|
||||
>
|
||||
My Runs
|
||||
</Link>
|
||||
<Link
|
||||
to="/stats"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
className="block px-3 py-2 rounded-md text-base font-medium hover:bg-gray-100 dark:hover:bg-gray-700"
|
||||
>
|
||||
Stats
|
||||
</Link>
|
||||
<Link
|
||||
to="/admin"
|
||||
onClick={() => setMenuOpen(false)}
|
||||
|
||||
Reference in New Issue
Block a user