Hide language switcher by default; unlock with 5 taps on top-right.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -36,8 +36,11 @@ export function LocaleProvider({ children }: { children: ReactNode }) {
|
||||
let cancelled = false;
|
||||
|
||||
try {
|
||||
// Prefer auto detection; only keep a locale if user unlocked and switched.
|
||||
const unlocked = window.sessionStorage.getItem("nomadro-lang-unlock") === "1";
|
||||
const saved = window.localStorage.getItem(STORAGE_KEY);
|
||||
if (isLocale(saved)) {
|
||||
|
||||
if (unlocked && isLocale(saved)) {
|
||||
if (!cancelled) {
|
||||
setLocaleState(saved);
|
||||
setReady(true);
|
||||
|
||||
Reference in New Issue
Block a user