summaryrefslogtreecommitdiff
path: root/docs/src/components/Header/LanguageSelect.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/components/Header/LanguageSelect.tsx')
-rw-r--r--docs/src/components/Header/LanguageSelect.tsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/docs/src/components/Header/LanguageSelect.tsx b/docs/src/components/Header/LanguageSelect.tsx
index 37fef6d08..70fb405a4 100644
--- a/docs/src/components/Header/LanguageSelect.tsx
+++ b/docs/src/components/Header/LanguageSelect.tsx
@@ -29,11 +29,7 @@ const LanguageSelect: FunctionalComponent<{ lang: string }> = ({ lang }) => {
aria-label="Select language"
onChange={(e) => {
const newLang = e.target.value;
- if (newLang === 'en') {
- window.location.pathname = `/getting-started`;
- } else {
- window.location.pathname = `/${newLang}/getting-started`;
- }
+ window.location.pathname = `/${newLang}/getting-started`;
// TODO: Preserve the current page, if it exists:
// const oldPathname = window.location.pathname;
// const oldPathnameParts = oldPathname.split('/');