Skip to content

Commit

Permalink
fix: Allow closing the filter modal on the Artist Series screen (#11223)
Browse files Browse the repository at this point in the history
fix: Allow closing the filter modal on Artist Series screen
  • Loading branch information
olerichter00 authored and gkartalis committed Dec 2, 2024
1 parent 03f747b commit d5ffcbc
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { OwnerType } from "@artsy/cohesion"
import { Box, Tabs, useScreenDimensions, Flex, useSpace } from "@artsy/palette-mobile"
import { Box, Flex, Tabs, useScreenDimensions, useSpace } from "@artsy/palette-mobile"
import { MasonryFlashListRef } from "@shopify/flash-list"
import { ArtistSeriesArtworks_artistSeries$key } from "__generated__/ArtistSeriesArtworks_artistSeries.graphql"
import { ArtworkFilterNavigator, FilterModalMode } from "app/Components/ArtworkFilter"
Expand Down Expand Up @@ -62,20 +62,16 @@ export const ArtistSeriesArtworks: React.FC<ArtistSeriesArtworksProps> = ({ arti
})
}, [artworksTotal])

const handleFilterToggle = () => {
setFilterArtworkModalVisible((prev) => {
return !prev
})
}

const openFilterArtworksModal = () => {
tracking.trackEvent(tracks.openFilterWindow(data.id, data.slug))
handleFilterToggle()

setFilterArtworkModalVisible(true)
}

const closeFilterArtworksModal = () => {
tracking.trackEvent(tracks.closeFilterWindow(data.id, data.slug))
handleFilterToggle()

setFilterArtworkModalVisible(false)
}

const loadMore = useCallback(() => {
Expand Down

0 comments on commit d5ffcbc

Please sign in to comment.