Fix useFilters hook to match API response structure
Remove nested .filters access to match updated FiltersResponse type. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,10 +19,10 @@ export function useFilters() {
|
||||
);
|
||||
|
||||
return {
|
||||
filters: data?.filters,
|
||||
localAuthorities: data?.filters.local_authorities || [],
|
||||
schoolTypes: data?.filters.school_types || [],
|
||||
years: data?.filters.years || [],
|
||||
filters: data,
|
||||
localAuthorities: data?.local_authorities || [],
|
||||
schoolTypes: data?.school_types || [],
|
||||
years: data?.years || [],
|
||||
isLoading,
|
||||
error,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user