feat: implement fully dynamic filter sidebar in backend getActiveFilters and frontend ArchivePage mapping with URL sync
This commit is contained in:
1 parent
2745125c5b
commit
0ccf37f922
5 files changed
+142
-37
No files matched your search
@@ -21,6 +21,15 @@ export default async function Shop({ searchParams }: { searchParams: Promise<{ [
|
||||
const resolvedParams = await searchParams;
|
||||
const category = typeof resolvedParams.category === 'string' ? resolvedParams.category : "all";
|
||||
const search = typeof resolvedParams.search === 'string' ? resolvedParams.search : "";
|
||||
const petType = typeof resolvedParams.petType === 'string' ? resolvedParams.petType : "all";
|
||||
const symptoms = typeof resolvedParams.symptoms === 'string' ? resolvedParams.symptoms : "";
|
||||
|
||||
return <ArchivePage initialCategory={category} initialSearch={search} />;
|
||||
return (
|
||||
<ArchivePage
|
||||
initialCategory={category}
|
||||
initialSearch={search}
|
||||
initialPetType={petType}
|
||||
initialSymptoms={symptoms}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user