chore: remove parent option added in issue sidebar and peek overview

This commit is contained in:
Anmol Singh Bhatia 2023-12-13 18:57:50 +05:30
parent 29a0ba4ddc
commit a0588be405

View File

@ -4,6 +4,8 @@ import { useRouter } from "next/router";
// components
import { ParentIssuesListModal } from "components/issues";
// icons
import { X } from "lucide-react";
// types
import { IIssue, ISearchIssueResponse } from "types";
@ -32,11 +34,11 @@ export const SidebarParentSelect: React.FC<Props> = ({ onChange, issueDetails, d
issueId={issueId as string}
projectId={projectId as string}
/>
<div className="flex items-center gap-2 rounded bg-custom-background-80 px-2.5 py-0.5 text-xs max-w-max">
<button
type="button"
className={`rounded bg-custom-background-80 px-2.5 py-0.5 text-xs ${
disabled ? "cursor-not-allowed" : "cursor-pointer "
}`}
className={`${disabled ? "cursor-not-allowed" : "cursor-pointer "}`}
onClick={() => setIsParentModalOpen(true)}
disabled={disabled}
>
@ -48,6 +50,17 @@ export const SidebarParentSelect: React.FC<Props> = ({ onChange, issueDetails, d
<span className="text-custom-text-200">Select issue</span>
)}
</button>
{selectedParentIssue && issueDetails?.parent && (
<button
type="button"
className={`${disabled ? "cursor-not-allowed" : "cursor-pointer "}`}
onClick={() => onChange("")}
disabled={disabled}
>
<X className="h-2.5 w-2.5" />
</button>
)}
</div>
</>
);
};