From c8c4f701dae0395eb8eff1b3e0f9302e39ed4bc8 Mon Sep 17 00:00:00 2001 From: Mickael Kerjean Date: Thu, 5 May 2022 00:46:16 +1000 Subject: [PATCH] fix (setup): weird behavior when setting up the app --- client/pages/adminpage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/client/pages/adminpage.js b/client/pages/adminpage.js index 00cf4cf3..f154195c 100644 --- a/client/pages/adminpage.js +++ b/client/pages/adminpage.js @@ -30,12 +30,11 @@ function AdminOnly(WrappedComponent) { return () => clearInterval(timeout); }, []); - if (isAdmin === true) { + if (isAdmin === true || /\/admin\/setup$/.test(location.pathname)) { return ( ); } else if (isAdmin === false) { return ( ); } - return ( ); }; } @@ -60,7 +59,7 @@ export default AdminOnly((props) => { /> } /> + render={() => } />