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:
@@ -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?.()}
|
||||
|
||||
Reference in New Issue
Block a user