From 694f2318bd2eaf526d8714c56774022a15beae04 Mon Sep 17 00:00:00 2001 From: Joseph Ditton Date: Tue, 30 Nov 2021 15:40:07 -0700 Subject: adds setup for roles --- client/app.jsx | 2 ++ client/components/router.jsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'client') 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 = () => { : } // no jwt means not logged in + element={authToken ? : } // no token means not logged in /> } /> } /> -- cgit v1.2.3-70-g09d2