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

This commit is contained in:
Anmol Singh Bhatia 2023-12-13 19:29:49 +05:30
parent a0588be405
commit e8945f244d

View File

@ -35,11 +35,19 @@ export const SidebarParentSelect: React.FC<Props> = ({ onChange, issueDetails, d
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={`${disabled ? "cursor-not-allowed" : "cursor-pointer "}`}
onClick={() => setIsParentModalOpen(true)}
className={`flex items-center gap-2 rounded bg-custom-background-80 px-2.5 py-0.5 text-xs max-w-max" ${
disabled ? "cursor-not-allowed" : "cursor-pointer "
}`}
onClick={() => {
if (issueDetails?.parent) {
onChange("");
setSelectedParentIssue(null);
} else {
setIsParentModalOpen(true);
}
}}
disabled={disabled}
>
{selectedParentIssue && issueDetails?.parent ? (
@ -49,18 +57,8 @@ export const SidebarParentSelect: React.FC<Props> = ({ onChange, issueDetails, d
) : (
<span className="text-custom-text-200">Select issue</span>
)}
{issueDetails?.parent && <X className="h-2.5 w-2.5" />}
</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>
</>
);
};