import MenuButton from "./MenuButton.tsx"; import { Link, useLocation } from "react-router-dom"; type Props = { url: string; logo: React.ReactNode; label: string; } const SidebarButton = ({url, logo, label}: Props) => { const { pathname } = useLocation(); const isActive = url === "/" ? pathname === "/" : pathname.startsWith(url); return ( {logo}{label} ) } export default SidebarButton;