From 5c18951e31c511b1627a069ccb0a1b9d0d750304 Mon Sep 17 00:00:00 2001 From: Deluan Date: Mon, 28 Apr 2025 09:52:53 -0400 Subject: [PATCH] fix(ui): streamline locale setting in App component Signed-off-by: Deluan --- ui/src/App.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/src/App.jsx b/ui/src/App.jsx index 3ac705b0a..d51604e83 100644 --- a/ui/src/App.jsx +++ b/ui/src/App.jsx @@ -87,10 +87,9 @@ const Admin = (props) => { useEffect(() => { if (config.defaultLanguage !== '' && !localStorage.getItem('locale')) { retrieveTranslation(config.defaultLanguage) + .then(() => setLocale(config.defaultLanguage)) .then(() => { - setLocale(config.defaultLanguage).then(() => { - localStorage.setItem('locale', config.defaultLanguage) - }) + localStorage.setItem('locale', config.defaultLanguage) refresh(true) }) .catch((e) => {