fix: add category and favorites filters to all recipe pages

- Move categories logic into Search component for centralization
- Add isLoggedIn prop to SeasonLayout and IconLayout components
- Fix FilterPanel CSS to properly handle hidden favorites filter
- Fix FavoritesFilter to trigger onToggle when checkbox changes
- Update Search effect to track all filter states (category, tags, icon, season, favorites)
- Hide favorites filter on favorites page while maintaining proper grid layout
- All filters now work consistently across entire site
This commit is contained in:
2026-01-10 17:19:55 +01:00
parent 7ab3482850
commit bc170abcdf
12 changed files with 44 additions and 28 deletions

View File

@@ -10,6 +10,7 @@
routePrefix = '/rezepte',
lang = 'de',
recipes = [],
isLoggedIn = false,
onSearchResults = (ids, categories) => {},
recipesSlot
}: {
@@ -18,6 +19,7 @@
routePrefix?: string,
lang?: string,
recipes?: any[],
isLoggedIn?: boolean,
onSearchResults?: (ids: any[], categories: any[]) => void,
recipesSlot?: Snippet
} = $props();
@@ -89,7 +91,7 @@
{/each}
</div>
<section>
<Search icon={active_icon} {lang} {recipes} {onSearchResults}></Search>
<Search icon={active_icon} {lang} {recipes} {isLoggedIn} {onSearchResults}></Search>
</section>
<section>
{@render recipesSlot?.()}