import { cn } from "@/util/utils"; import { NavLink, useSearchParams } from "react-router-dom"; type Option = { label: string; to: string; }; type Props = { options: Option[]; }; function SwitchBarNavigation({ options }: Props) { const [searchParams] = useSearchParams(); return (
{options.map((option) => { return ( { return cn( "cursor-pointer rounded-sm px-3 py-2 hover:bg-slate-700", { "bg-slate-700": isActive, }, ); }} > {option.label} ); })}
); } export { SwitchBarNavigation };