From c6eea9c7a9d74a7f24820e064a67aecf94aacaf6 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Fri, 11 Aug 2023 19:17:02 +0530 Subject: [PATCH] fix: empty groups not appearing in the kanban view (#1843) --- apps/app/hooks/my-issues/use-my-issues.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/app/hooks/my-issues/use-my-issues.tsx b/apps/app/hooks/my-issues/use-my-issues.tsx index 6d39e548f..aae05bc84 100644 --- a/apps/app/hooks/my-issues/use-my-issues.tsx +++ b/apps/app/hooks/my-issues/use-my-issues.tsx @@ -52,8 +52,23 @@ const useMyIssues = (workspaceSlug: string | undefined) => { allIssues: myIssues, }; + if (groupBy === "state_detail.group") { + return myIssues + ? Object.assign( + { + backlog: [], + unstarted: [], + started: [], + completed: [], + cancelled: [], + }, + myIssues + ) + : undefined; + } + return myIssues; - }, [myIssues]); + }, [groupBy, myIssues]); const isEmpty = Object.values(groupedIssues ?? {}).every((group) => group.length === 0) ||