Skip to content

Commit

Permalink
Add more popular topics
Browse files Browse the repository at this point in the history
  • Loading branch information
IanPhilips committed Nov 27, 2024
1 parent 329c778 commit d9e85ab
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 17 deletions.
50 changes: 35 additions & 15 deletions common/src/topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const TOPICS_TO_SUBTOPICS: { [key: string]: TopicInfo[] } = {
'9a003f6b-9fd1-46ab-871d-2904953c4d5b', // March Madness 2024
'beeb69e0-b36f-451a-80e1-e059df456bb1', // College Basketball
'i0v3cXwuxmO9fpcInVYb', // NBA
// TODO: merge these groups
],
},
{
Expand All @@ -98,21 +97,28 @@ export const TOPICS_TO_SUBTOPICS: { [key: string]: TopicInfo[] } = {
{ name: '⚾ Baseball', groupIds: ['786nRQzgVyUnuUtaLTGW'] },
{ name: '🏎️ F1', groupIds: ['OyHBKJOz9YaGkDctpwuY'] },
{ name: '🚲 Cycling', groupIds: ['2yisxJryUq9V5sG7P6Gy'] },
// { name: '🎾 Tennis', groupIds: ['1mvN9vIVIopcWiAsXhzp'] },
{ name: '🎾 Tennis', groupIds: ['1mvN9vIVIopcWiAsXhzp'] },
// { name: '🏏 Cricket', groupIds: ['LcPYoqxSRdeQMms4lR3g'] },
],
'🎬 Entertainment': [
// Movies, TV Shows, Music, Celebrities
{
name: '🍿 Movies, TV, & Music',
groupIds: [
'KSeNIu7AWgiBBM5FqVuB',
'Xuc2UY8gGfjQqFXwxq5d',
'4QIcUOfCSSha0JZHAg9X',
'EUSEngFk1dGGBfaMeAmh',
'KSeNIu7AWgiBBM5FqVuB', // Movies
'Xuc2UY8gGfjQqFXwxq5d', // Music
'4QIcUOfCSSha0JZHAg9X', // Celebrities
'EUSEngFk1dGGBfaMeAmh', // TV and Film
'eJZecx6r22G2NriYYXcC', // Culture
'XU1fOYURSnb58lgsqaly', // Entertainment & Pop culture
],
},
{
name: '🎮 Gaming',
groupIds: [
'5FaFmmaNNFTSA5r0vTAi', // Gaming
'9FaZmHrfS8IcDJyu6pUD', // Video Games
],
},
{ name: '🎮 Gaming', groupIds: ['5FaFmmaNNFTSA5r0vTAi'] },
{
name: '🎮️ Destiny.gg',
groupIds: ['W2ES30fRo6CCbPNwMTTj'],
Expand All @@ -122,15 +128,14 @@ export const TOPICS_TO_SUBTOPICS: { [key: string]: TopicInfo[] } = {
groupIds: ['uJSql24HUqpEpVU0FrjI'],
},
],
'💼 Business': [
'💵 Econ & Finance': [
{
// Finance, Economics
name: '💵 Econ',
groupIds: ['CgB83AAMkkOHSrTnzani', 'p88Ycq6yFd5ECKqq9PFO'],
},
{
name: '🦄 Startups',
groupIds: ['19c319ca-033c-474f-b417-5f07efe88ec0'],
groupIds: [
'CgB83AAMkkOHSrTnzani', // Finance
'p88Ycq6yFd5ECKqq9PFO', // Economics
'pmK8sntWL1SDkMm53UBR', // Business
],
},
{
// Stocks, Tech Stocks
Expand All @@ -151,8 +156,23 @@ export const TOPICS_TO_SUBTOPICS: { [key: string]: TopicInfo[] } = {
groupIds: ['3syjPCC7PxE5KurTiTT3', 'j3ZE8fkeqiKmRGumy3O1'],
},
],
'🎲 Random': [
{
name: '🤠 Fun',
groupIds: ['bBwafyeaiuwWwobwm2c4'],
},
{
name: '💪 Personal Goals',
groupIds: [
'izQp87CKagOVJp9Olm1p', // Personal goals
'wxAGTtNee5f2PTzjqSI2', // Personal
],
},
],
}

export const TOPICS_TO_HIDE_FROM_WELCOME_FLOW = ['🎲 Random']

export const GROUP_SLUGS_TO_HIDE_FROM_WELCOME_FLOW = [
'world-default',
'shortterm-markets',
Expand Down
5 changes: 4 additions & 1 deletion web/components/onboarding/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Group } from 'common/group'
import {
getSubtopics,
GROUP_SLUGS_TO_HIDE_FROM_WELCOME_FLOW,
TOPICS_TO_HIDE_FROM_WELCOME_FLOW,
TOPICS_TO_SUBTOPICS,
} from 'common/topics'
import { intersection, orderBy, uniq, uniqBy } from 'lodash'
Expand Down Expand Up @@ -338,7 +339,9 @@ function TopicsPage(props: {
string[] | undefined
>()

const topics = Object.keys(TOPICS_TO_SUBTOPICS)
const topics = Object.keys(TOPICS_TO_SUBTOPICS).filter(
(topic) => !TOPICS_TO_HIDE_FROM_WELCOME_FLOW.includes(topic)
)

useEffect(() => {
if (userBetInTopics.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion web/components/search/contract-filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export function ContractFilters(props: {
})
}}
>
Your topics
For you
</FilterPill>
)}
{!hideFilter && currentTiers !== DEFAULT_TIER && (
Expand Down

0 comments on commit d9e85ab

Please sign in to comment.