Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -9,6 +9,10 @@ const { updateProfile } = useUserStore();
|
||||
const platform = usePlatform();
|
||||
const { checkAndPromptUpdate } = useAppUpdate();
|
||||
|
||||
onBeforeMount(() => {
|
||||
loadSavedLanguage();
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (!isAuthenticated.value)
|
||||
return;
|
||||
@@ -26,10 +30,6 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
onBeforeMount(() => {
|
||||
loadSavedLanguage();
|
||||
});
|
||||
|
||||
watch(locale, (newLocale) => {
|
||||
document.querySelector("html")?.setAttribute("lang", newLocale);
|
||||
}, { immediate: true });
|
||||
|
||||
Reference in New Issue
Block a user