mirror of
https://github.com/navidrome/navidrome.git
synced 2026-08-31 07:30:32 +00:00
fix(ui): streamline locale setting in App component
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
2b744c878e
commit
5c18951e31
@ -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) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user