fix(filters): forward gender, admissions_policy, has_sixth_form to API
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 32s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m6s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 32s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 32s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m6s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 32s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
These params were present in the URL but never passed to fetchSchools on the server side, so the backend never applied the filters. Also include them in hasSearchParams so filter-only searches trigger a fetch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,9 @@ interface HomePageProps {
|
|||||||
postcode?: string;
|
postcode?: string;
|
||||||
radius?: string;
|
radius?: string;
|
||||||
sort?: string;
|
sort?: string;
|
||||||
|
gender?: string;
|
||||||
|
admissions_policy?: string;
|
||||||
|
has_sixth_form?: string;
|
||||||
}>;
|
}>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +44,10 @@ export default async function HomePage({ searchParams }: HomePageProps) {
|
|||||||
params.local_authority ||
|
params.local_authority ||
|
||||||
params.school_type ||
|
params.school_type ||
|
||||||
params.phase ||
|
params.phase ||
|
||||||
params.postcode
|
params.postcode ||
|
||||||
|
params.gender ||
|
||||||
|
params.admissions_policy ||
|
||||||
|
params.has_sixth_form
|
||||||
);
|
);
|
||||||
|
|
||||||
// Fetch data on server with error handling
|
// Fetch data on server with error handling
|
||||||
@@ -60,6 +66,9 @@ export default async function HomePage({ searchParams }: HomePageProps) {
|
|||||||
radius,
|
radius,
|
||||||
page,
|
page,
|
||||||
page_size: 50,
|
page_size: 50,
|
||||||
|
gender: params.gender,
|
||||||
|
admissions_policy: params.admissions_policy,
|
||||||
|
has_sixth_form: params.has_sixth_form,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Empty state by default
|
// Empty state by default
|
||||||
|
|||||||
Reference in New Issue
Block a user