import { Link, useLocation } from "react-router-dom"; import React from "react"; 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 ( ) } export default SidebarButton;