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.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user