profile: only show Contests tab when host has a contest and flag is on#14258
Merged
dylanjeffers merged 3 commits intomainfrom May 7, 2026
Merged
profile: only show Contests tab when host has a contest and flag is on#14258dylanjeffers merged 3 commits intomainfrom
dylanjeffers merged 3 commits intomainfrom
Conversation
The Contests tab was rendered for every artist profile, regardless of whether the CONTESTS feature flag was on or whether the artist actually hosted any remix contest. The desktop and mobile-web tab lists missed the flag check entirely; the React Native side gated on the flag but not on host activity. Add useUserHasRemixContest, a shared hook that paginates the global remix-contest list (with the same MAX_PAGES_TO_LOAD cap as ContestsTab) and matches event.userId against the host. Wire it into the desktop, mobile-web, and React Native profile screens so the tab only appears when the flag is enabled AND the artist hosts at least one contest. Also fall back to the default tab if a viewer hits /:handle/contests on a profile that no longer qualifies. https://claude.ai/code/session_015jtkBQyrvnULHbEDxgM9gc
🦋 Changeset detectedLatest commit: c5d8756 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14258.audius.workers.dev Unique preview for this PR (deployed from this branch). |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CONTESTSfeature flag is enabled and the artist actually hosts at least one remix contest.useUserHasRemixContesthook in@audius/commonthat paginates the global remix-contest list (sameMAX_PAGES_TO_LOADcap asContestsTab) and matchesevent.userIdagainst the host./:handle/contestson a profile that no longer qualifies, the body falls back to the default tab so it stays in sync with the (now hidden) tab list.Why
Before this change the desktop and mobile-web profiles always rendered the Contests tab for any artist, ignoring the feature flag entirely; the React Native side respected the flag but still showed the tab for artists who don't run any contest. Both led to an empty/unreachable destination.
Test plan
/:handle/contestsdirectly on a profile that doesn't qualify — body falls back to the default tab.https://claude.ai/code/session_015jtkBQyrvnULHbEDxgM9gc
Generated by Claude Code