import { useState } from 'react'; import { Link } from 'react-router-dom'; import { ChevronUp, X } from 'lucide-react'; import { useTranslation } from '@/contexts/language'; import { useMapFooterHidden } from '@/hooks/useMapFooterHidden'; import { cn } from '@/lib/utils'; /** * The site links that live in the desktop footer — surfaced on the map * (a full-bleed route where the footer is hidden) without stealing map height. * * Desktop: a slim full-width bar. Mobile: a tiny collapsed "Links" chip that * expands to a compact row. Dismissible, and restorable from Settings → * Appearance. */ export function MapFooterStrip() { const { t } = useTranslation(); const [hidden, setHidden] = useMapFooterHidden(); const [open, setOpen] = useState(false); if (hidden) return null; const links = [ { to: '/diy', label: t('nav.diy') }, { to: '/newsletter', label: t('nav.newsletter') }, { to: '/license', label: t('chromeUi.license') }, { to: '/privacy', label: t('chromeUi.privacy') }, ]; return (
{/* Desktop — slim full-width bar */}
{links.map((l) => ( {l.label} ))}
{t('chromeUi.notSponsoredBy')} OpenSats OpenSats
{/* Mobile — a tiny chip that expands to a compact row */}
{open && (
{links.map((l) => ( {l.label} ))}
)}
); }