Skip to content

Commit

Permalink
🐪 Homepage language improvements (#5865)
Browse files Browse the repository at this point in the history
* New filter generation

* Adjust public video filter to use new language prop and all categories

* Revert config changes
  • Loading branch information
WRadoslaw committed Feb 9, 2024
1 parent 2f42279 commit ba23d39
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/atlas/src/api/schemas/orion.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion packages/atlas/src/config/contentFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ export const cancelledVideoFilter: VideoWhereInput = {
},
}

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.find((category) => category.name === 'Crypto')?.videoCategories,
id_in: atlasConfig.content.categories.map((category) => category.videoCategories).flat(),
},
media: {
isAccepted_eq: true,
Expand Down

0 comments on commit ba23d39

Please sign in to comment.