-
Notifications
You must be signed in to change notification settings - Fork 585
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Filter out disliked artworks correctly on the home screen for al…
…l recommendation rails (#11366) * fix: Filter out disliked artworks on artworks rail * more rails & refetch * rename * do not render section when no artworks * feature flag * import * remove early return * fix tests
- Loading branch information
1 parent
c2cf031
commit 9d4737f
Showing
6 changed files
with
94 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { ContextModule } from "@artsy/cohesion" | ||
|
||
const ENABLED_CONTEXT_MODULES = [ | ||
ContextModule.newWorksForYouRail, | ||
ContextModule.artworkRecommendationsRail, | ||
ContextModule.lotsForYouRail, | ||
ContextModule.newWorksByGalleriesYouFollowRail, | ||
] | ||
|
||
/** | ||
* returns true if hiding disliked artworks is enabled for the given context module | ||
*/ | ||
export const isDislikeArtworksEnabledFor = (contextModule: string | null | undefined) => { | ||
return ENABLED_CONTEXT_MODULES.includes(contextModule as ContextModule) | ||
} |