diff --git a/src/components/public/MacroLegend.tsx b/src/components/public/MacroLegend.tsx deleted file mode 100644 index 345cd7e..0000000 --- a/src/components/public/MacroLegend.tsx +++ /dev/null @@ -1,39 +0,0 @@ -'use client'; - -import { useState } from 'react'; -import { useTranslations } from 'next-intl'; -import { MACRO_COLORS, MACRO_KEYS } from '@/lib/macros'; - -// Collapsible accessible legend for the universal macro color code. -export default function MacroLegend() { - const t = useTranslations('macros'); - const tm = useTranslations('menu'); - const [open, setOpen] = useState(false); - - return ( -
- - {open && ( - - )} -
- ); -} diff --git a/src/components/public/PublicMenu.tsx b/src/components/public/PublicMenu.tsx index 4699582..16c1fc9 100644 --- a/src/components/public/PublicMenu.tsx +++ b/src/components/public/PublicMenu.tsx @@ -8,7 +8,6 @@ import { pickText } from '@/lib/text'; import BrandHeader from './BrandHeader'; import DishCard from './DishCard'; import ListRow from './ListRow'; -import MacroLegend from './MacroLegend'; import Gallery from './Gallery'; import AiConsultant from './AiConsultant'; import SuggestionCarousel from './SuggestionCarousel'; @@ -79,11 +78,9 @@ export default function PublicMenu({ menu, slug }: { menu: MenuSnapshot; slug: s const ordersEnabled = menu.restaurant.ordersEnabled; const splitEnabled = ordersEnabled && !!menu.restaurant.splitEnabled; - // Macros hierarchy: global flag AND the section's own flag. The legend appears - // only if at least one visible section actually shows macros. + // Macros hierarchy: shown only if the global flag AND the section's flag are on. const globalMacros = menu.restaurant.showMacros; const sectionShowsMacros = (s: { showMacros?: boolean }) => globalMacros && s.showMacros !== false; - const anyMacros = globalMacros && sections.some((s) => s.showMacros !== false); function scrollToSection(id: string) { setActiveSection(id); @@ -215,7 +212,6 @@ export default function PublicMenu({ menu, slug }: { menu: MenuSnapshot; slug: s {/* View toggle (cards vs traditional list). Not persisted. */}
- {anyMacros &&
}