import { useEffect, useState } from 'react'; import { Link, NavLink, useLocation } from 'react-router-dom'; import { Download, Menu, X } from 'lucide-react'; import { api } from '../lib/api'; import { SearchBox } from './SearchBox'; export function Logo({ size = 28 }: { size?: number }) { // Three conformational "states" joined by transitions. return ( ); } const NAV = [ { to: '/browse', label: 'Browse' }, { to: '/statistics', label: 'Statistics' }, { to: '/docs', label: 'Docs' }, ]; export function Header() { const location = useLocation(); const [open, setOpen] = useState(false); const isHome = location.pathname === '/'; useEffect(() => setOpen(false), [location.pathname, location.search]); return ( MuSProt {!isHome && ( )} {NAV.map((n) => ( `site-nav__link ${isActive ? 'is-active' : ''}`}> {n.label} ))} Download setOpen((o) => !o)} > {open ? : } {open && ( {!isHome && } {NAV.map((n) => ( {n.label} ))} Download MuSProt.db )} ); } export function Footer() { return ( ); }