Skip to content

Commit

Permalink
🌶️ Bring back language filtering and remove category filter
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Feb 22, 2024
1 parent 42da05b commit d4f1a06
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/atlas/src/config/contentFilter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ChannelWhereInput, VideoWhereInput } from '@/api/queries/__generated__/baseTypes.generated'
import { atlasConfig } from '@/config/config'

export const publicChannelFilter: ChannelWhereInput = {
isCensored_eq: false,
Expand All @@ -17,15 +16,12 @@ export const cancelledVideoFilter: VideoWhereInput = {
},
}

const browserLanguage = navigator.language.split('-')[0]
const browserLanguage = navigator.language?.split('-')[0]

export const publicCryptoVideoFilter: VideoWhereInput = {
isPublic_eq: true,
isCensored_eq: false,
orionLanguage_in: [...(browserLanguage ? [browserLanguage] : []), 'en'],
category: {
id_in: atlasConfig.content.categories.map((category) => category.videoCategories).flat(),
},
media: {
isAccepted_eq: true,
},
Expand Down

0 comments on commit d4f1a06

Please sign in to comment.