From 2e4cf6a57cb07b8bef857239a9a3bc2df596b411 Mon Sep 17 00:00:00 2001 From: Marc Gavanier Date: Mon, 12 Feb 2024 23:01:32 +0100 Subject: [PATCH] feat: do not display language selection when there is a single available language --- src/app/(home)/_components/Header.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/app/(home)/_components/Header.tsx b/src/app/(home)/_components/Header.tsx index b9f69e2..c3da2df 100644 --- a/src/app/(home)/_components/Header.tsx +++ b/src/app/(home)/_components/Header.tsx @@ -42,13 +42,15 @@ export const Header = (): ReactElement => { {i18n.speakers} {i18n.tickets} {i18n.sponsors} - - {LANGUAGE_SETTINGS.availableLanguages.map((lang: string) => ( - changeSelectedLanguage(lang)} key={lang}> - {languagesMap.get(lang)} - - ))} - + {LANGUAGE_SETTINGS.availableLanguages.length > 1 && ( + + {LANGUAGE_SETTINGS.availableLanguages.map((lang: string) => ( + changeSelectedLanguage(lang)} key={lang}> + {languagesMap.get(lang)} + + ))} + + )}