diff --git a/components/teks/teks.js b/components/teks/teks.js index 770c7ea..05d01e7 100644 --- a/components/teks/teks.js +++ b/components/teks/teks.js @@ -135,14 +135,6 @@ const langToArray = parole => { .map(({field, title, continent, vedette}) => ({field, title, continent, vedette, lang: parole.traductions[field]})) } -const BROWSER_LANG_TO_FIELD = { - yo: 'yoruba', ln: 'lingala', wo: 'wolof', sw: 'swahili', ha: 'hausa', - ar: 'arabe', om: 'oromo', ig: 'igbo', zu: 'zoulou', mg: 'malgache', - xh: 'xhosa', tn: 'tswana', ts: 'tsonga', st: 'sesotho', - ja: 'japonais', ko: 'coreen', en: 'anglais', fr: 'francais', - es: 'espagnol', de: 'allemand', it: 'italien', pt: 'portugais', -} - const ExplicitTooltip = Tooltip export default function Teks({parole}) { @@ -167,20 +159,6 @@ export default function Teks({parole}) { return () => setCurrentTrack(null) }, [parole, setCurrentTrack]) - useEffect(() => { - const browserLang = navigator.language?.split('-')[0]?.toLowerCase() - if (!browserLang || browserLang === parole.langueSource) { - return - } - - const champ = BROWSER_LANG_TO_FIELD[browserLang] - const index = langArray.findIndex(lang => lang.field === champ) - if (index !== -1) { - setTab(index + 1) - } - // eslint-disable-next-line react-hooks/exhaustive-deps -- ne doit s'exécuter qu'au montage, pas à chaque changement d'onglet - }, []) - return (