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:
9
src/lib/js/categories.ts
Normal file
9
src/lib/js/categories.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Get the list of recipe categories based on language
|
||||
*/
|
||||
export function getCategories(lang: string): string[] {
|
||||
const isEnglish = lang === 'en';
|
||||
return isEnglish
|
||||
? ["Main course", "Noodle", "Bread", "Dessert", "Soup", "Side dish", "Salad", "Cake", "Breakfast", "Sauce", "Ingredient", "Drink", "Spread", "Biscuits", "Snack"]
|
||||
: ["Hauptspeise", "Nudel", "Brot", "Dessert", "Suppe", "Beilage", "Salat", "Kuchen", "Frühstück", "Sauce", "Zutat", "Getränk", "Aufstrich", "Guetzli", "Snack"];
|
||||
}
|
||||
Reference in New Issue
Block a user