Open bmwoodside opened 2 years ago
added "force login cookie to view any page in the application (hold user at login/reg until validated)" item
third task (force login cookie to view any page in the application (hold user at login/reg until validated)) is partially completed. This needs a re-write and a re-think to how we're storing user.
I think a re-write is necessary: call out the useEffect from Main.jsx and handle the "user" state information in App.js. This will then have a requirement to pass user down to all routes as props or ... maybe through useContext (probably better) which will allow us to ensure that only "logged-in" users are able to view information (everyone else will redirect to the login component).