Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
Signed-off-by: Ansh Goyal <[email protected]>
  • Loading branch information
anshgoyalevil committed Sep 28, 2023
1 parent 4bb2f3b commit 13a375e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/navigation/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function NavBar({
const changeLanguage = async (locale, langPicker) => {

// Verifies if the language change is from langPicker or the browser-api
if(langPicker){
if (langPicker) {
localStorage.setItem('i18nLang', locale);
}

Expand Down Expand Up @@ -185,7 +185,12 @@ export default function NavBar({
changeLanguage(value.toLowerCase(), true);
}}
className=""
selected={i18n.language.toLocaleUpperCase()}
selected={() => {
if (i18n.language) {
return i18n.language.toLocaleUpperCase();
}
return "EN";
}}
/>

<GithubButton text="Star on GitHub" href="https://github.com/asyncapi/spec" className="py-2 ml-2" inNav="true" />
Expand Down

0 comments on commit 13a375e

Please sign in to comment.