"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Button } from "../ui/button"; export const CreateKeyButton = (props: { keyAuthId: string }) => { const href = `/app/keys/${props.keyAuthId}/new`; const path = usePathname(); const setUrl = () => { window.location.href = href; }; if (path?.match(href)) { return ( ); } return ( ); };