From 3c2b2e3ed6d8bb7546dbad15807875bda830d7ae Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Wed, 10 Apr 2024 13:02:56 +0530 Subject: [PATCH] [WEB-924] chore: remove `Add Issues` button from completed cycles header. (#4153) * [WEB-924] chore: remove `Add Issues` button from completed cycles header. * fix: analytics button. --- web/components/headers/cycle-issues.tsx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/web/components/headers/cycle-issues.tsx b/web/components/headers/cycle-issues.tsx index 2fd5ffe83..ac59287e3 100644 --- a/web/components/headers/cycle-issues.tsx +++ b/web/components/headers/cycle-issues.tsx @@ -142,6 +142,7 @@ export const CycleIssuesHeader: React.FC = observer(() => { // derived values const cycleDetails = cycleId ? getCycleById(cycleId.toString()) : undefined; + const isCompletedCycle = cycleDetails?.status?.toLocaleLowerCase() === "completed"; const canUserCreateIssue = currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole); @@ -274,16 +275,18 @@ export const CycleIssuesHeader: React.FC = observer(() => { - + {!isCompletedCycle && ( + + )} )}