From 7de4feddaf3ca450f3e6156009bb6576b8522e99 Mon Sep 17 00:00:00 2001 From: DenisVorop Date: Thu, 2 Nov 2023 23:21:39 +0300 Subject: [PATCH] fix(GoalSidebar): user can not remove partnership projects & tags --- src/components/GoalSidebar/GoalSidebar.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/GoalSidebar/GoalSidebar.tsx b/src/components/GoalSidebar/GoalSidebar.tsx index d59c64252..bb33332f3 100644 --- a/src/components/GoalSidebar/GoalSidebar.tsx +++ b/src/components/GoalSidebar/GoalSidebar.tsx @@ -158,7 +158,9 @@ export const GoalSidebar: FC = ({ goal, onGoalTagRemove, onGoa {goal.partnershipProjects?.map((project) => ( - removePartnerProject(project.id)} /> + {nullable(goal._isEditable, () => ( + removePartnerProject(project.id)} /> + ))} ))} @@ -184,7 +186,9 @@ export const GoalSidebar: FC = ({ goal, onGoalTagRemove, onGoa {goal.tags.map((tag) => ( - + {nullable(goal._isEditable, () => ( + + ))} {tag.title} ))}