Skip to content

Commit

Permalink
fix(GoalSidebar): user can not remove partnership projects & tags
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisVorop committed Nov 3, 2023
1 parent bdd4e85 commit 7de4fed
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/GoalSidebar/GoalSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ export const GoalSidebar: FC<GoalSidebarProps> = ({ goal, onGoalTagRemove, onGoa
{goal.partnershipProjects?.map((project) => (
<TextListItem key={project.id}>
<ProjectBadge id={project.id} title={project.title}>
<IconXCircleSolid size="xs" onClick={() => removePartnerProject(project.id)} />
{nullable(goal._isEditable, () => (
<IconXCircleSolid size="xs" onClick={() => removePartnerProject(project.id)} />
))}
</ProjectBadge>
</TextListItem>
))}
Expand All @@ -184,7 +186,9 @@ export const GoalSidebar: FC<GoalSidebarProps> = ({ goal, onGoalTagRemove, onGoa
<TagsList>
{goal.tags.map((tag) => (
<Tag key={tag.id}>
<TagCleanButton onClick={onGoalTagRemove(tag)} />
{nullable(goal._isEditable, () => (
<TagCleanButton onClick={onGoalTagRemove(tag)} />
))}
{tag.title}
</Tag>
))}
Expand Down

0 comments on commit 7de4fed

Please sign in to comment.