Skip to content

Commit

Permalink
fix(Tag): remove unreachable descrition prop
Browse files Browse the repository at this point in the history
  • Loading branch information
LamaEats committed Sep 11, 2023
1 parent 9f7694f commit fb39f55
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
18 changes: 8 additions & 10 deletions src/components/GoalListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,14 @@ export const GoalListItem: React.FC<GoalListItemProps> = React.memo(
</TableCell>

<TagsCell>
{tags?.map((tag) =>
nullable(tag, (t) => (
<StyledGoalTag
key={t.id}
description={t.description ?? undefined}
onClick={onTagClick?.(t)}
>
{t.title}
</StyledGoalTag>
)),
{nullable(tags, (t) =>
t.map((tag) =>
nullable(tag, (item) => (
<StyledGoalTag key={item.id} onClick={onTagClick?.(item)}>
{item.title}
</StyledGoalTag>
)),
),
)}
</TagsCell>

Expand Down
19 changes: 9 additions & 10 deletions src/components/IssueTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ const StyledIssueTags = styled.span`
padding-left: ${gapS};
`;

export const IssueTags: React.FC<IssueTagsProps> = ({ tags, size = 'm' }) => (
<StyledIssueTags>
{tags?.map((tag) =>
nullable(tag, (t) => (
<Tag key={t.id} size={size} description={t.description ?? undefined}>
{t.title}
export const IssueTags: React.FC<IssueTagsProps> = ({ tags, size = 'm' }) =>
nullable(tags, (t) => (
<StyledIssueTags>
{t.map((tag) => (
<Tag key={tag.id} size={size}>
{tag.title}
</Tag>
)),
)}
</StyledIssueTags>
);
))}
</StyledIssueTags>
));
6 changes: 1 addition & 5 deletions src/components/TagComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ export const TagComboBox = React.forwardRef<HTMLDivElement, TagComboBoxProps>(
/>
)}
renderItem={(props) => (
<Tag
key={props.item.id}
description={props.item.description}
onClick={suggestions.data?.length ? props.onClick : createTag}
>
<Tag key={props.item.id} onClick={suggestions.data?.length ? props.onClick : createTag}>
{props.item.title}
</Tag>
)}
Expand Down

0 comments on commit fb39f55

Please sign in to comment.