import React, { useState } from "react"; import { AlertTriangle } from "lucide-react"; import { Dialog, Transition } from "@headlessui/react"; import type { TIssue } from "@plane/types"; // icons // ui import { Button } from "@plane/ui"; // types import { useProject } from "@/hooks/store"; type Props = { data: TIssue; isOpen: boolean; onClose: () => void; onSubmit: () => Promise; }; export const DeclineIssueModal: React.FC = ({ isOpen, onClose, data, onSubmit }) => { const [isDeclining, setIsDeclining] = useState(false); // hooks const { getProjectById } = useProject(); const handleClose = () => { setIsDeclining(false); onClose(); }; const handleDecline = () => { setIsDeclining(true); onSubmit().finally(() => setIsDeclining(false)); }; return (

Decline Issue

Are you sure you want to decline issue{" "} {getProjectById(data?.project_id)?.identifier}-{data?.sequence_id} {""}? This action cannot be undone.

); };