refactor: simplify currentLocale determination in LanguageSwitcher component
This commit is contained in:
@@ -10,10 +10,7 @@ import LanguageOutlinedIcon from "@mui/icons-material/LanguageOutlined";
|
||||
const LanguageSwitcher = () => {
|
||||
const theme = useTheme();
|
||||
const appContext = useContext(AppContext);
|
||||
const currentLocale =
|
||||
appContext && appContext.locale
|
||||
? String(appContext.locale).toUpperCase()
|
||||
: "EN";
|
||||
const currentLocale = appContext && appContext.locale === "en" ? "NL" : "EN";
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
|
||||
Reference in New Issue
Block a user