From 17c9989ce1405f61b988842e2096d23c94a3a72c Mon Sep 17 00:00:00 2001 From: Noel Chou Date: Wed, 6 Nov 2024 17:29:13 -0500 Subject: [PATCH] fix: bugs from Colin's testing --- .../common/language-chooser-react-hook/useLanguageChooser.ts | 2 +- .../react/language-chooser-react-mui/src/LanguageChooser.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/language-chooser/react/common/language-chooser-react-hook/useLanguageChooser.ts b/components/language-chooser/react/common/language-chooser-react-hook/useLanguageChooser.ts index 39ac231..8e9d151 100644 --- a/components/language-chooser/react/common/language-chooser-react-hook/useLanguageChooser.ts +++ b/components/language-chooser/react/common/language-chooser-react-hook/useLanguageChooser.ts @@ -66,7 +66,7 @@ export const useLanguageChooser = ( // either a script is selected or there are no scripts for the selected language (!!selectedScript || selectedLanguage?.scripts?.length === 0) && // if unlisted language, name and country are required - (!isUnlistedLanguage || + (!isUnlistedLanguage(selectedLanguage) || (customizableLanguageDetails.dialect !== "" && customizableLanguageDetails.region?.name !== "")); diff --git a/components/language-chooser/react/language-chooser-react-mui/src/LanguageChooser.tsx b/components/language-chooser/react/language-chooser-react-mui/src/LanguageChooser.tsx index e3e128a..5630e13 100644 --- a/components/language-chooser/react/language-chooser-react-mui/src/LanguageChooser.tsx +++ b/components/language-chooser/react/language-chooser-react-mui/src/LanguageChooser.tsx @@ -357,7 +357,6 @@ export const LanguageChooser: React.FunctionComponent<{ }} css={css` background-color: white; - margin-right: 16px; margin-bottom: 10px; font-size: 1.625rem; // 26px font-weight: 700;