d52593f3b2
- Router: no need to specify the route directly anymore (will come from definition), but we still need to disable it for certain regions. - Sidebar: no need to custom addition anymore. ## Ticket `odysee-homepages :: 1318`
23 lines
659 B
JavaScript
23 lines
659 B
JavaScript
import { getLanguageEngName } from 'constants/languages';
|
|
|
|
const HOMEPAGE_LANGUAGES = {
|
|
en: getLanguageEngName('en'),
|
|
fr: getLanguageEngName('fr'),
|
|
es: getLanguageEngName('es'),
|
|
de: getLanguageEngName('de'),
|
|
zh: getLanguageEngName('zh'),
|
|
ru: getLanguageEngName('ru'),
|
|
'pt-BR': getLanguageEngName('pt-BR'),
|
|
};
|
|
|
|
export function getHomepageLanguage(code) {
|
|
// -----override-----
|
|
if (code === 'zh-Hans' || code === 'zh-Hant') return HOMEPAGE_LANGUAGES.zh;
|
|
// ------------------
|
|
|
|
return HOMEPAGE_LANGUAGES[code] || null;
|
|
}
|
|
|
|
export default HOMEPAGE_LANGUAGES;
|
|
|
|
export const HOMEPAGE_EXCLUDED_CATEGORIES = Object.freeze(['NEWS', 'WILD_WEST']);
|