From 12f098487326fe118a0a197bfd65b15a65e99483 Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sun, 24 Apr 2022 19:00:08 +0200 Subject: [PATCH 1/2] Added testing mode --- src/client/src/FrontPage.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/client/src/FrontPage.js b/src/client/src/FrontPage.js index 9fae354..00465ee 100644 --- a/src/client/src/FrontPage.js +++ b/src/client/src/FrontPage.js @@ -223,7 +223,18 @@ export default function App() { setUser({ isManager: false, isLoggedIn: false }); }); } - + // Debug mode, allow all: + // let fetchUser = () => { + // setUser({ + // name: "TEST USERTEST", + // isManager: true, + // isLoggedIn: true, + // email: "testesen@gmail.com", + // asuraId: "123456789", + // googleId: "234" + // }); + // } + React.useEffect(() => { fetchUser(); }, []); From 116162ec50074cbefb5bc397f4f691df6426043f Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Sun, 24 Apr 2022 19:24:07 +0200 Subject: [PATCH 2/2] Hide history-link --- src/client/src/FrontPage.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/src/FrontPage.js b/src/client/src/FrontPage.js index 00465ee..07c949d 100644 --- a/src/client/src/FrontPage.js +++ b/src/client/src/FrontPage.js @@ -190,9 +190,11 @@ function Home(props) { } - - Finished tournaments are moved to the history-page - + {props.user.isLoggedIn && + + Finished tournaments are moved to the history-page + + } ); @@ -223,7 +225,7 @@ export default function App() { setUser({ isManager: false, isLoggedIn: false }); }); } - // Debug mode, allow all: + // // Debug mode, allow all: // let fetchUser = () => { // setUser({ // name: "TEST USERTEST",