2022-06-21 15:01:41 +00:00
|
|
|
import { difference } from 'lodash'
|
|
|
|
|
2022-05-12 15:07:10 +00:00
|
|
|
export const CATEGORIES = {
|
|
|
|
politics: 'Politics',
|
|
|
|
technology: 'Technology',
|
|
|
|
science: 'Science',
|
|
|
|
world: 'World',
|
2022-05-16 03:44:47 +00:00
|
|
|
sports: 'Sports',
|
2022-05-12 15:07:10 +00:00
|
|
|
economics: 'Economics',
|
2022-05-16 03:44:47 +00:00
|
|
|
personal: 'Personal',
|
|
|
|
culture: 'Culture',
|
|
|
|
manifold: 'Manifold',
|
|
|
|
covid: 'Covid',
|
2022-05-12 15:07:10 +00:00
|
|
|
crypto: 'Crypto',
|
2022-05-16 03:44:47 +00:00
|
|
|
gaming: 'Gaming',
|
|
|
|
fun: 'Fun',
|
2022-06-21 15:01:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type category = keyof typeof CATEGORIES
|
2022-05-12 15:07:10 +00:00
|
|
|
|
|
|
|
export const TO_CATEGORY = Object.fromEntries(
|
|
|
|
Object.entries(CATEGORIES).map(([k, v]) => [v, k])
|
|
|
|
)
|
|
|
|
|
|
|
|
export const CATEGORY_LIST = Object.keys(CATEGORIES)
|
2022-06-21 15:01:41 +00:00
|
|
|
|
|
|
|
export const EXCLUDED_CATEGORIES: category[] = ['fun', 'manifold', 'personal']
|
|
|
|
|
|
|
|
export const DEFAULT_CATEGORIES = difference(
|
|
|
|
CATEGORY_LIST,
|
|
|
|
EXCLUDED_CATEGORIES
|
|
|
|
)
|