feat(bands): filter ignored bands from home feed
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
This commit is contained in:
parent
212082050c
commit
0c7df04b92
1 changed files with 7 additions and 5 deletions
|
|
@ -57,10 +57,13 @@ export function TieredBandList({ initialVerticals }: { initialVerticals: Vertica
|
||||||
if (isAuthenticated && preferences.length > 0) {
|
if (isAuthenticated && preferences.length > 0) {
|
||||||
// User has preferences
|
// User has preferences
|
||||||
const headlinerIds = preferences.filter(p => p.tier === "headliner").map(p => p.vertical_id)
|
const headlinerIds = preferences.filter(p => p.tier === "headliner").map(p => p.vertical_id)
|
||||||
const subscribedIds = preferences.map(p => p.vertical_id)
|
const ignoredIds = preferences.filter(p => p.tier === "ignored").map(p => p.vertical_id)
|
||||||
|
|
||||||
headliners = verticals.filter(v => headlinerIds.includes(v.id))
|
// Filter out ignored bands from display
|
||||||
others = verticals.filter(v => !headlinerIds.includes(v.id))
|
const visibleVerticals = verticals.filter(v => !ignoredIds.includes(v.id))
|
||||||
|
|
||||||
|
headliners = visibleVerticals.filter(v => headlinerIds.includes(v.id))
|
||||||
|
others = visibleVerticals.filter(v => !headlinerIds.includes(v.id))
|
||||||
|
|
||||||
// If user has NO headliners set but HAS preferences, maybe show their top priority?
|
// If user has NO headliners set but HAS preferences, maybe show their top priority?
|
||||||
// Or just defaults.
|
// Or just defaults.
|
||||||
|
|
@ -76,8 +79,7 @@ export function TieredBandList({ initialVerticals }: { initialVerticals: Vertica
|
||||||
// Let's show subscribed bands as "Your Bands" and others as "Discover".
|
// Let's show subscribed bands as "Your Bands" and others as "Discover".
|
||||||
// But for simple "Tiered Band Preferences" UI, let's keep it simple:
|
// But for simple "Tiered Band Preferences" UI, let's keep it simple:
|
||||||
// Headliners = Tier 'headliner'
|
// Headliners = Tier 'headliner'
|
||||||
// Touring Acts = Everyone else (or just subscribed 'main_stage'?)
|
// Touring Acts = Everyone else (excluding ignored)
|
||||||
// Let's show All Bands but prioritize Headliners.
|
|
||||||
} else {
|
} else {
|
||||||
// Guest or no prefs
|
// Guest or no prefs
|
||||||
headliners = verticals.filter(v => defaultHeadliners.includes(v.slug))
|
headliners = verticals.filter(v => defaultHeadliners.includes(v.slug))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue