/* ═══════════════════════════════════════════════════════════════ FRONT PAGE BANDS Each band the front page can show (front_page_sections.section): the anchor it sits at, and the heading it gets when the admin gives it none. Home.tsx draws the bands; the nav and footer list the ones the front page is showing (navSections.ts). The countdown has no anchor: it's a card under the hero, not a section to jump to. ═══════════════════════════════════════════════════════════════ */ import type { FrontPage, FrontPageSectionKey } from './useFrontPage.ts' export const FRONT_PAGE_BANDS: Record = { countdown: { id: null, title: 'Next up' }, retreats: { id: 'retreats', title: 'National Retreats' }, calendar: { id: 'calendar', title: 'What’s on' }, stats: { id: 'numbers', title: 'By the numbers' }, timeline: { id: 'story', title: 'Our story so far' }, connect: { id: 'connect', title: 'Find your way in' }, featured: { id: 'featured', title: 'Featured' }, } /* Whether a band has anything to draw: Home.tsx leaves out a band with nothing in it, and so does the nav. */ export function bandShows(page: FrontPage, key: FrontPageSectionKey): boolean { switch (key) { case 'countdown': return Boolean(page.countdown) case 'stats': return page.stats.length > 0 case 'connect': return page.paths.length > 0 case 'featured': return page.featured.length > 0 default: return true } }