revert the commented out code, fixing the subIssue mutation (#4524)

This commit is contained in:
rahulramesha 2024-05-20 15:42:55 +05:30 committed by GitHub
parent f8a443d6a6
commit 3bfa8f5f88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,14 +57,14 @@ export const IssueBlock: React.FC<IssueBlockProps> = observer((props: IssueBlock
setPeekIssue({ workspaceSlug, projectId: issue.project_id, issueId: issue.id, nestingLevel: nestingLevel });
const issue = issuesMap[issueId];
// const subIssues = subIssuesStore.subIssuesByIssueId(issueId);
const subIssues = subIssuesStore.subIssuesByIssueId(issueId);
const { isMobile } = usePlatformOS();
if (!issue) return null;
const canEditIssueProperties = canEditProperties(issue.project_id);
const projectIdentifier = getProjectIdentifierById(issue.project_id);
// if sub issues have been fetched for the issue, use that for count or use issue's sub_issues_count
// const subIssuesCount = subIssues ? subIssues.length : issue.sub_issues_count;
const subIssuesCount = subIssues ? subIssues.length : issue.sub_issues_count;
const paddingLeft = `${spacingLeft}px`;
@ -94,13 +94,13 @@ export const IssueBlock: React.FC<IssueBlockProps> = observer((props: IssueBlock
}
)}
>
<div className="flex w-full truncate" style={issue?.parent_id && nestingLevel !== 0 ? { paddingLeft } : {}}>
<div className="flex w-full truncate" style={nestingLevel !== 0 ? { paddingLeft } : {}}>
<div className="flex flex-grow items-center gap-3 truncate">
<div className="flex items-center gap-0.5">
<div className="flex items-center group">
<span className="size-3.5" />
<div className="flex h-4 w-4 items-center justify-center">
{issue.sub_issues_count > 0 && (
{subIssuesCount > 0 && (
<button
className="flex items-center justify-center h-4 w-4 cursor-pointer rounded-sm text-custom-text-400 hover:text-custom-text-300"
onClick={handleToggleExpand}