VRMS
VRMS copied to clipboard
Create withAuth component to manage automatic redirect to login page
Overview
The auth component is imported in multiple locations protecting components that should only be accessed when the user is logged in. This can be more easily handled with a hook to make the code cleaner.
Action Items
- Create a hook that consumes the users log in state and redirects to the login page if the user is not logged in.
- Replace instances of the old redirect method.