import React, { useState } from "react"; import { useRouter } from "next/router"; // components import { ParentIssuesListModal } from "components/issues"; // icons import { X } from "lucide-react"; // types import { IIssue, ISearchIssueResponse } from "types"; type Props = { onChange: (value: string) => void; issueDetails: IIssue | undefined; projectId: string; disabled?: boolean; }; export const SidebarParentSelect: React.FC = ({ onChange, issueDetails, projectId, disabled = false }) => { const [isParentModalOpen, setIsParentModalOpen] = useState(false); const [selectedParentIssue, setSelectedParentIssue] = useState(null); const router = useRouter(); const { issueId } = router.query; return ( <> setIsParentModalOpen(false)} onChange={(issue) => { onChange(issue.id); setSelectedParentIssue(issue); }} issueId={issueId as string} projectId={projectId as string} />
{issueDetails?.parent && ( )}
); };