instead of relying on LocalStorage to store auth-token (which was causing issues since an expired token would not prevent user from continuing to use logged-in privileges), used cookie
created new endpoint that verifies whether jwt cookie attached in request is valid
reordered folder contents functionally (i.e. got rid of context and util folder since they were primarily used by just 1 other folder
created simple LoadingPage as intermediate state while verifying whether user is logged in in LoginWrapper
gutted UserProvider to just hold state for TopBar, LoginWrapper, and Login to use
fixed how Login/Logout wouldn't render on logout/login, respectively, until refresh
Key Points
jwt
cookie attached in request is validcontext
andutil
folder since they were primarily used by just 1 other folderLoadingPage
as intermediate state while verifying whether user is logged in inLoginWrapper
UserProvider
to just hold state forTopBar
,LoginWrapper
, andLogin
to use