1
0
forked from baron/baron-sso

front류 개발모드에서는 세션 갱신 끄기

This commit is contained in:
2026-05-20 11:48:31 +09:00
parent 0031784c07
commit 0155ee4ee7
17 changed files with 287 additions and 23 deletions

View File

@@ -2,6 +2,7 @@ import { useState } from "react";
import { t } from "../../lib/i18n";
const LOCALE_STORAGE_KEY = "locale";
const LOCALE_CHANGED_EVENT = "baron_locale_changed";
const SUPPORTED_LOCALES = ["ko", "en"] as const;
type Locale = (typeof SUPPORTED_LOCALES)[number];
@@ -34,6 +35,10 @@ function LanguageSelector() {
}
window.localStorage.setItem(LOCALE_STORAGE_KEY, next);
setLocale(next);
if (import.meta.env.MODE === "development") {
window.dispatchEvent(new Event(LOCALE_CHANGED_EVENT));
return;
}
window.location.reload();
};