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