import React, { useState } from "react"; import { CheckCircle } 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 AcceptIssueModal: React.FC = ({ isOpen, onClose, data, onSubmit }) => { const [isAccepting, setIsAccepting] = useState(false); // hooks const { getProjectById } = useProject(); const handleClose = () => { setIsAccepting(false); onClose(); }; const handleAccept = () => { setIsAccepting(true); onSubmit().finally(() => setIsAccepting(false)); }; return (

Accept Issue

Are you sure you want to accept issue{" "} {getProjectById(data?.project_id)?.identifier}-{data?.sequence_id} {""}? Once accepted, this issue will be added to the project issues list.

); };