import { LinkIncludingShortenedCollectionAndTags } from "@/types/global"; import { useRouter } from "next/router"; import clsx from "clsx"; import usePinLink from "@/lib/client/pinLink"; type Props = { link: LinkIncludingShortenedCollectionAndTags; btnStyle?: string; }; export default function LinkPin({ link, btnStyle }: Props) { const pinLink = usePinLink(); const router = useRouter(); const isPublicRoute = router.pathname.startsWith("/public") ? true : false; const isAlreadyPinned = link?.pinnedBy && link.pinnedBy[0] ? true : false; return (