import { useState } from "react"; import { useRouter } from "next/router"; import { CustomMenu } from "@plane/ui"; import { Link, Trash2 } from "lucide-react"; // hooks import useToast from "hooks/use-toast"; // components import { DeleteArchivedIssueModal } from "components/issues"; // helpers import { copyUrlToClipboard } from "helpers/string.helper"; // types import { IQuickActionProps } from "../list/list-view-types"; export const ArchivedIssueQuickActions: React.FC = (props) => { const { issue, handleDelete } = props; const router = useRouter(); const { workspaceSlug } = router.query; // states const [deleteIssueModal, setDeleteIssueModal] = useState(false); const { setToastAlert } = useToast(); const handleCopyIssueLink = () => { copyUrlToClipboard(`/${workspaceSlug}/projects/${issue.project}/archived-issues/${issue.id}`).then(() => setToastAlert({ type: "success", title: "Link copied", message: "Issue link copied to clipboard", }) ); }; return ( <> setDeleteIssueModal(false)} onSubmit={handleDelete} /> { e.preventDefault(); e.stopPropagation(); handleCopyIssueLink(); }} >
Copy link
{ e.preventDefault(); e.stopPropagation(); setDeleteIssueModal(true); }} >
Delete issue
); };