ui: sync lang button active state on initial load and refresh
This commit is contained in:
@@ -518,6 +518,10 @@ if (!localStorage.getItem("tutor_lang")) {
|
||||
}
|
||||
|
||||
updateStaticText();
|
||||
const savedLang = localStorage.getItem("tutor_lang") || document.documentElement.lang || "ko";
|
||||
document.querySelectorAll(".lang-btn").forEach((btn) => {
|
||||
btn.classList.toggle("is-active", btn.dataset.lang === savedLang);
|
||||
});
|
||||
window.renderAuth = renderAuth;
|
||||
window.setLanguage = setLanguage;
|
||||
renderAuth();
|
||||
|
||||
Reference in New Issue
Block a user