Skip to content

Commit

Permalink
chore: retire AREnableArtworkGridSaveIcon ff (#9603)
Browse files Browse the repository at this point in the history
chore: retire AREnableArtworkGridSaveIcon
  • Loading branch information
MounirDhahri authored Nov 27, 2023
1 parent 6f2ca47 commit 2640289
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
17 changes: 9 additions & 8 deletions src/app/Components/ArtworkGrids/ArtworkGridItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { GlobalStore } from "app/store/GlobalStore"
import { PageableRouteProps } from "app/system/navigation/useNavigateToPageableRoute"
import { useArtworkBidding } from "app/utils/Websockets/auctions/useArtworkBidding"
import { getUrgencyTag } from "app/utils/getUrgencyTag"
import { useFeatureFlag } from "app/utils/hooks/useFeatureFlag"
import { useSaveArtwork } from "app/utils/mutations/useSaveArtwork"
import { RandomNumberGenerator } from "app/utils/placeholders"
import {
Expand Down Expand Up @@ -102,7 +101,6 @@ export const Artwork: React.FC<ArtworkProps> = ({
const itemRef = useRef<any>()
const color = useColor()
const tracking = useTracking()
const eableArtworkGridSaveIcon = useFeatureFlag("AREnableArtworkGridSaveIcon")
const [showCreateArtworkAlertModal, setShowCreateArtworkAlertModal] = useState(false)

let filterParams: any = undefined
Expand Down Expand Up @@ -177,16 +175,20 @@ export const Artwork: React.FC<ArtworkProps> = ({

addArtworkToRecentSearches()
trackArtworkTap()
navigateToPageableRoute?.(artwork.href!)
if (artwork.href) {
navigateToPageableRoute?.(artwork.href)
}
}

const trackArtworkTap = () => {
// Unless you explicitly pass in a tracking function or provide a contextScreenOwnerType, we won't track
// taps from the grid.
if (trackTap || contextScreenOwnerType) {
if (trackTap) {
trackTap(artwork.slug, itemIndex)
} else if (contextScreenOwnerType) {
const genericTapEvent = tappedMainArtworkGrid({
contextScreen,
contextScreenOwnerType: contextScreenOwnerType!,
contextScreenOwnerType: contextScreenOwnerType,
contextScreenOwnerId,
contextScreenOwnerSlug,
destinationScreenOwnerId: artwork.internalID,
Expand All @@ -196,8 +198,7 @@ export const Artwork: React.FC<ArtworkProps> = ({
sort: String(filterParams?.sort),
query: contextScreenQuery,
})

trackTap ? trackTap(artwork.slug, itemIndex) : tracking.trackEvent(genericTapEvent)
tracking.trackEvent(genericTapEvent)
}
}

Expand Down Expand Up @@ -341,7 +342,7 @@ export const Artwork: React.FC<ArtworkProps> = ({
</Text>
)}
</Flex>
{!!eableArtworkGridSaveIcon && !hideSaveIcon && (
{!hideSaveIcon && (
<Flex>
<Touchable
haptic
Expand Down
5 changes: 0 additions & 5 deletions src/app/store/config/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ export const features: { [key: string]: FeatureDescriptor } = {
description: "Use artworksConnection for Auction screen",
echoFlagKey: "AREnableArtworksConnectionForAuction",
},
AREnableArtworkGridSaveIcon: {
description: "Enable artwork grid save icon",
readyForRelease: true,
echoFlagKey: "AREnableArtworkGridSaveIcon",
},
AREnableAndroidImagesGallery: {
description: "Enable images gallery on Android",
readyForRelease: true,
Expand Down

0 comments on commit 2640289

Please sign in to comment.