From 695a571c1f9a0bb89b2ff693afe785046b1c77f9 Mon Sep 17 00:00:00 2001 From: Tudor Date: Mon, 30 Mar 2026 10:45:09 +0100 Subject: [PATCH] fix(filters): forward gender, admissions_policy, has_sixth_form to API 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 --- nextjs-app/app/page.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nextjs-app/app/page.tsx b/nextjs-app/app/page.tsx index 2180a5b..3f9da02 100644 --- a/nextjs-app/app/page.tsx +++ b/nextjs-app/app/page.tsx @@ -16,6 +16,9 @@ interface HomePageProps { postcode?: string; radius?: 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.school_type || params.phase || - params.postcode + params.postcode || + params.gender || + params.admissions_policy || + params.has_sixth_form ); // Fetch data on server with error handling @@ -60,6 +66,9 @@ export default async function HomePage({ searchParams }: HomePageProps) { radius, page, page_size: 50, + gender: params.gender, + admissions_policy: params.admissions_policy, + has_sixth_form: params.has_sixth_form, }); } else { // Empty state by default