import React from "react"; import {usePathname} from "next/navigation"; import {Tooltip, Button} from "@heroui/react"; import {capitalize} from "@heroui/shared-utils"; import {BugIcon} from "@/components/icons"; import {ISSUE_REPORT_URL} from "@/libs/github/constants"; export const BugReportButton = () => { const pathname = usePathname(); const componentTitle = capitalize(pathname?.split("/")?.at(-1) ?? ""); const handlePress = () => { window.open(`${ISSUE_REPORT_URL}${componentTitle}`, "_blank"); }; return ( ); };