diff options
author | Joseph Ditton <jditton.atomic@gmail.com> | 2021-11-30 15:40:07 -0700 |
---|---|---|
committer | Joseph Ditton <jditton.atomic@gmail.com> | 2021-11-30 15:40:07 -0700 |
commit | 694f2318bd2eaf526d8714c56774022a15beae04 (patch) | |
tree | edaed14ca7d7a52e8a7a8bcdb7483d1a34bd334a /client | |
parent | 8d0b32f8dfe45291426e58f6bf20cffac8dab6e7 (diff) | |
download | locchat-694f2318bd2eaf526d8714c56774022a15beae04.tar.gz locchat-694f2318bd2eaf526d8714c56774022a15beae04.zip |
adds setup for roles
Diffstat (limited to 'client')
-rw-r--r-- | client/app.jsx | 2 | ||||
-rw-r--r-- | client/components/router.jsx | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/client/app.jsx b/client/app.jsx index a7de3cf..e1e4c03 100644 --- a/client/app.jsx +++ b/client/app.jsx @@ -26,6 +26,8 @@ export const App = () => { setLoading(false); }, []); + // before displaying anything try getting a token using cookies, + // can display a loading screen here if desired if (loading) return null; return ( diff --git a/client/components/router.jsx b/client/components/router.jsx index fa552fc..ccdb83a 100644 --- a/client/components/router.jsx +++ b/client/components/router.jsx @@ -12,7 +12,7 @@ export const Router = () => { <Routes> <Route path="/" - element={authToken ? <Home /> : <Navigate replace to="signin" />} // no jwt means not logged in + element={authToken ? <Home /> : <Navigate replace to="signin" />} // no token means not logged in /> <Route path="signin" element={<SignIn />} /> <Route path="signup" element={<SignUp />} /> |