Fix filters API response structure
Backend returns filters directly at top level, not wrapped in 'filters' property. Update FiltersResponse type and page components to match actual API response. Fixes empty dropdowns for school types and local authorities. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
parent
ef4932b553
commit
148e46ae6a
@@ -49,7 +49,7 @@ export default async function RankingsPage({ searchParams }: RankingsPageProps)
|
||||
return (
|
||||
<RankingsView
|
||||
rankings={rankingsResponse?.rankings || []}
|
||||
filters={filtersResponse?.filters || { local_authorities: [], school_types: [], years: [] }}
|
||||
filters={filtersResponse || { local_authorities: [], school_types: [], years: [] }}
|
||||
metrics={metricsArray}
|
||||
selectedMetric={metric}
|
||||
selectedArea={local_authority}
|
||||
|
||||
Reference in New Issue
Block a user