import type { ReactNode } from "react"; import { entry, HOME, Link, TABS, tab } from "./router"; import { SETS } from "./Sets"; // A name you already know, or a set to look through: different enough to be // two places rather than one view that changes shape when the box is empty. const MODES = [ { path: HOME, label: "Search" }, { path: SETS, label: "Sets" }, ]; export function Modes({ path, crumb }: { path: string; crumb?: ReactNode }) { return (
{MODES.map(({ path: to, label }) => ( {label} ))} {crumb && {crumb}}
); } export function Nav({ path }: { path: string }) { const here = tab(path); return ( ); }