Skip to content

Commit

Permalink
Move vessel list filters to slice
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Oct 9, 2024
1 parent 1db85ff commit 3e99d74
Show file tree
Hide file tree
Showing 7 changed files with 279 additions and 278 deletions.
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/favorite_vessel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ context('Favorite Vessel', () => {
}
})

cy.get('*[data-cy^="close-vessel-track"]').click()
cy.get('*[data-cy^="close-vessel-track"]').click({ force: true })
cy.get('*[data-cy^="close-vessel-track"]').should('not.exist')

cy.cleanScreenshots(2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import type { FilterTag as FilterTagType } from '@features/Filter/types'

type FilterTagProps = Readonly<{
iconElement: JSX.Element | undefined
remove?: () => void
tag: FilterTagType
text: string
uuid: string | undefined
}>
export function FilterTag({ iconElement, tag, text, uuid }: FilterTagProps) {
export function FilterTag({ iconElement, remove, tag, text, uuid }: FilterTagProps) {
const dispatch = useMainAppDispatch()

return (
Expand All @@ -21,7 +22,7 @@ export function FilterTag({ iconElement, tag, text, uuid }: FilterTagProps) {
<CloseIcon
color={THEME.color.gunMetal}
data-cy="vessel-filter-remove-tag"
onClick={() => dispatch(removeTagFromFilter({ ...tag, uuid }))}
onClick={() => (remove ? remove() : dispatch(removeTagFromFilter({ ...tag, uuid })))}
size={10}
/>
</TagWrapper>
Expand Down
Loading

0 comments on commit 3e99d74

Please sign in to comment.