55c91dfcdd
* start on script
* Revert "Remove category filters"
This reverts commit d6e808e1a3
.
* Convert categories to official default groups
* Add new users to default groups
* Rework group cards
* Cleanup
* Add unique bettors to contract and sort by them
* Most bettors to most popular
* Unused vars
* Track unique bettor ids on contracts
* Add followed users' bets to personal markets
* Add new users to welcome, bugs, and updates groups
* Add users to fewer default cats
40 lines
838 B
TypeScript
40 lines
838 B
TypeScript
import { difference } from 'lodash'
|
|
|
|
export const CATEGORIES_GROUP_SLUG_POSTFIX = '-default'
|
|
export const CATEGORIES = {
|
|
politics: 'Politics',
|
|
technology: 'Technology',
|
|
science: 'Science',
|
|
world: 'World',
|
|
sports: 'Sports',
|
|
economics: 'Economics',
|
|
personal: 'Personal',
|
|
culture: 'Culture',
|
|
manifold: 'Manifold',
|
|
covid: 'Covid',
|
|
crypto: 'Crypto',
|
|
gaming: 'Gaming',
|
|
fun: 'Fun',
|
|
}
|
|
|
|
export type category = keyof typeof CATEGORIES
|
|
|
|
export const TO_CATEGORY = Object.fromEntries(
|
|
Object.entries(CATEGORIES).map(([k, v]) => [v, k])
|
|
)
|
|
|
|
export const CATEGORY_LIST = Object.keys(CATEGORIES)
|
|
|
|
export const EXCLUDED_CATEGORIES: category[] = [
|
|
'fun',
|
|
'manifold',
|
|
'personal',
|
|
'covid',
|
|
'culture',
|
|
'gaming',
|
|
'crypto',
|
|
'world',
|
|
]
|
|
|
|
export const DEFAULT_CATEGORIES = difference(CATEGORY_LIST, EXCLUDED_CATEGORIES)
|