diff --git a/estore/src/components/FeaturedProducts.tsx b/estore/src/components/FeaturedProducts.tsx index 1820e7c..68a556a 100644 --- a/estore/src/components/FeaturedProducts.tsx +++ b/estore/src/components/FeaturedProducts.tsx @@ -82,11 +82,15 @@ export default function FeaturedProducts() { return visible }, [items, catOrder, catHidden]) - const tabs = useMemo(() => [ - ...activeOccasions.map((o) => ({ key: o.key, label: `${o.emoji} ${o.label}`, occasion: true })), - { key: 'all', label: 'All', occasion: false }, - ...productCategories.map((c) => ({ ...c, occasion: false })), - ], [activeOccasions, productCategories]) + const tabs = useMemo(() => { + // Category slugs already represented by an occasion tab — hide them from the regular tabs + const occasionSlugs = new Set(activeOccasions.map((o) => o.squareCategorySlug).filter(Boolean) as string[]) + return [ + ...activeOccasions.map((o) => ({ key: o.key, label: `${o.emoji} ${o.label}`, occasion: true })), + { key: 'all', label: 'All', occasion: false }, + ...productCategories.filter((c) => !occasionSlugs.has(c.key)).map((c) => ({ ...c, occasion: false })), + ] + }, [activeOccasions, productCategories]) const activeOccasion: ActiveOccasion | undefined = useMemo( () => activeOccasions.find((o) => o.key === category),