Speed up championship hub loading

This commit is contained in:
2026-07-03 01:11:31 -04:00
parent c989aace10
commit 127628e4dd
6 changed files with 303 additions and 10 deletions

View File

@@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/jpeg" href="/favicon.jpg" />
<title>box-box</title>
</head>
<body>

BIN
frontend/public/favicon.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

View File

@@ -62,7 +62,9 @@ export async function fetchWeekend(meetingKey: number): Promise<Weekend> {
}
export async function fetchChampionshipHub(year?: number): Promise<ChampionshipHub> {
const url = year ? `/api/v1/championship/hub?year=${year}` : '/api/v1/championship/hub'
const params = new URLSearchParams({ source: 'auto' })
if (year) params.set('year', year.toString())
const url = `/api/v1/championship/hub?${params.toString()}`
const res = await fetch(url)
if (!res.ok) {
throw new Error(`API ${res.status}: ${res.statusText}`)