import React, { useState } from "react"; // ui import { ChevronDown, PenSquare, Search } from "lucide-react"; // hooks import useLocalStorage from "hooks/use-local-storage"; // components import { CreateUpdateDraftIssueModal } from "components/issues"; // mobx store import { useMobxStore } from "lib/mobx/store-provider"; export const WorkspaceSidebarQuickAction = () => { const store: any = useMobxStore(); const [isDraftIssueModalOpen, setIsDraftIssueModalOpen] = useState(false); const { storedValue, clearValue } = useLocalStorage("draftedIssue", JSON.stringify({})); return ( <> setIsDraftIssueModalOpen(false)} prePopulateData={storedValue ? JSON.parse(storedValue) : {}} onSubmit={() => { localStorage.removeItem("draftedIssue"); clearValue(); }} fieldsToShow={["all"]} />
{storedValue && Object.keys(JSON.parse(storedValue)).length > 0 && ( <>
)}
); };