I’d like to implement an age restriction – users must be 21+ to use the app since it involves alcohol.
My index page has a button for users to “Confirm I’m 21+” which then changes a User data field AgeConfirmed
from “no” to “yes” and brings them to the real homepage.
If a user direct links into another part of the website, right now there are no restrictions. I’d like to pop-up a mandatory age confirmation button or re-reroute them automatically to the index page. Basically, if the user hasn’t clicked the age confirmation button, they shouldn’t be able to access any other pages on the app.
Any tips on how I can implement this? I’ve thought about conditionally setting opacity to 0% if User AgeConfirmed
= “no” but that feels very janky.
Appreciate any help!