From d5ffcbc7ae49fa0e51825036f560a5614f6e4d51 Mon Sep 17 00:00:00 2001 From: Ole Date: Fri, 29 Nov 2024 15:33:18 +0100 Subject: [PATCH] fix: Allow closing the filter modal on the Artist Series screen (#11223) fix: Allow closing the filter modal on Artist Series screen --- .../Scenes/ArtistSeries/ArtistSeriesArtworks.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx b/src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx index 45f64addc99..ca83a52df60 100644 --- a/src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx +++ b/src/app/Scenes/ArtistSeries/ArtistSeriesArtworks.tsx @@ -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" @@ -62,20 +62,16 @@ export const ArtistSeriesArtworks: React.FC = ({ 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(() => {