/* global React, NA_DATA */ const { useState, useEffect, useRef, useMemo } = React; // ---------- Shared chrome ---------- function Topbar({ page, setPage, mobileOpen, setMobileOpen }) { const { NAVIGATION } = NA_DATA; return (
{ setPage('home'); setMobileOpen(false); }}> Nottingham Athletic crest Nottingham Athletic
{/* Rendered OUTSIDE
on purpose: .topbar has backdrop-filter, which would make it the containing block for this position:fixed drawer and clamp it to the header's height. As a top-level sibling its inset:0 resolves against the viewport and covers the screen. */} {mobileOpen && (
{NAVIGATION.map(n => ( { setPage(n.id); setMobileOpen(false); }}> {n.label} ))}
)} ); } function Footer({ setPage }) { return ( ); } // ---------- Reusable bits ---------- function Photo({ variant = 'photo-v1', tag, glyph, className = '', style, src, focal }) { if (src) { return (
{tag {tag && {tag}}
); } return (
{glyph} {tag && {tag}}
); } function Pill({ children, kind = 'navy' }) { return {children}; } function Stat({ label, value, sub }) { return (
{label}
{value}
{sub &&
{sub}
}
); } function SquadCard({ squad, onClick }) { return (
{squad.short}
{squad.tag}

{squad.name}

{squad.players} players · {squad.coach}
); } function FilterBar({ items, value, onChange }) { return (
{items.map(it => ( ))}
); } function FixtureRow({ fx, expanded, onToggle }) { const isWin = fx.result?.outcome === 'win'; const isLoss = fx.result?.outcome === 'loss'; return ( <>
{fx.date.day} {fx.date.month}
{fx.home ? 'vs ' : 'at '} {fx.opponent} {fx.status === 'past' && ( {isWin ? 'W' : isLoss ? 'L' : '–'} )}
{fx.squadLabel} · {fx.tipoff} · {fx.venue || 'TBC'}
{fx.status === 'upcoming' ? fx.fullDate.replace(/^[A-Za-z]+ /, '') : `${fx.result.ours} – ${fx.result.theirs}`}
{expanded && (
Date
{fx.fullDate}
Venue
{fx.venue || 'TBC'}
Tip-off
{fx.tipoff}
Notes
{fx.notes}
)} ); } window.NASite = { Topbar, Footer, Photo, Pill, Stat, SquadCard, FilterBar, FixtureRow };