We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0712f52 + f8415bf commit 2a17587Copy full SHA for 2a17587
src/components/sections/courses/_partials/LanguageSwitcher.tsx
@@ -41,12 +41,13 @@ export default function LanguageSelector(): ReactElement {
41
course.translations
42
.filter((locale) => locale)
43
.forEach((translation) => {
44
+ const code = translation.locale || "en";
45
setLocales((prev) => [
46
...prev,
47
{
48
id: translation.id,
- code: translation.locale,
49
- name: languages[translation.locale],
+ code,
50
+ name: languages[code],
51
},
52
]);
53
});
0 commit comments