Skip to content

Commit

Permalink
fix: sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrvvu committed Nov 29, 2024
1 parent b981e4c commit 1866d31
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/design-system/components/chip/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ const ChipContent: React.FC<ChipContentProps> = ({
endIcon
}) => (
<>
{startIcon && <span className='startIcon'>{startIcon}</span>}
{startIcon ? <span className='startIcon'>{startIcon}</span> : null}
<span className='label'>{label}</span>
{endIcon && <span className='endIcon'>{endIcon}</span>}
{endIcon ? <span className='endIcon'>{endIcon}</span> : null}
</>
)

Expand All @@ -89,7 +89,7 @@ const FilterChip: React.FC<FilterChipProps> = ({

const handleSelect = (option: string) => {
setSelectedOption(option)
setIsOpen((prev) => !prev)
setIsOpen(false)
}

const isSelected = Boolean(selectedOption)
Expand Down Expand Up @@ -124,6 +124,7 @@ const FilterChip: React.FC<FilterChipProps> = ({
onMouseDown={() => {
handleSelect(option)
}}
role='button'
>
{option}
</li>
Expand Down

0 comments on commit 1866d31

Please sign in to comment.