Files
J621/frontend/src/lib/age.ts
T
JakeBreath a0d36911e7 Add an 18+ entry screen before the app renders
A homescreen-style age gate shown before auth or any route: J621 brand
mark, the explicit 18+ check, an Enter action remembered per browser in
localStorage (j621.age-verified), and a blocked state if the visitor
chooses Leave.
2026-09-17 13:47:51 -05:00

18 lines
370 B
TypeScript

const AGE_KEY = "j621.age-verified";
export function isAgeVerified(): boolean {
try {
return window.localStorage.getItem(AGE_KEY) === "1";
} catch {
return false;
}
}
export function markAgeVerified(): void {
try {
window.localStorage.setItem(AGE_KEY, "1");
} catch {
// Private mode with storage disabled: the gate simply shows again.
}
}