import React, { useState } from "react"; // headless ui import { Dialog, Transition } from "@headlessui/react"; // icons import { CheckCircleIcon } from "@heroicons/react/24/outline"; // ui import { SecondaryButton, PrimaryButton } from "components/ui"; // types import type { IInboxIssue } from "types"; type Props = { isOpen: boolean; handleClose: () => void; data: IInboxIssue | undefined; onSubmit: () => Promise; }; export const AcceptIssueModal: React.FC = ({ isOpen, handleClose, data, onSubmit }) => { const [isAccepting, setIsAccepting] = useState(false); const onClose = () => { setIsAccepting(false); handleClose(); }; const handleAccept = () => { setIsAccepting(true); onSubmit().finally(() => setIsAccepting(false)); }; return (

Accept Issue

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

Cancel {isAccepting ? "Accepting..." : "Accept Issue"}
); };