import React, { useState } from "react"; import { Dialog, Transition } from "@headlessui/react"; // icons import { CheckCircle } from "lucide-react"; // ui import { Button } from "@plane/ui"; // types import { useProject } from "hooks/store"; import type { TIssue } from "@plane/types"; 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.

); };