refactor: simplify currentLocale determination in LanguageSwitcher component

This commit is contained in:
Dan Dobos
2025-10-20 21:09:03 +02:00
parent 78c68efc00
commit 1b8ca5c4da
@@ -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