From b8ffa8346546495f7d7aa20576eb385ec31c5d4a Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Fri, 10 Sep 2021 12:36:31 +0900 Subject: [PATCH] IT builds again. --- src/TestHeader.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/TestHeader.js b/src/TestHeader.js index 50fd0ad..aa5602f 100644 --- a/src/TestHeader.js +++ b/src/TestHeader.js @@ -7,22 +7,24 @@ const cookies = require('cookie-handler'); function TestHeader(p) { + const {BACKENDURL,LOGGEDINUSER,LOGGEDINHASH} = p; + const [avatar,setAvatar] = useState(undefined); const [username,setUsername] = useState(undefined); useEffect(()=>{ - axios.post(p.BACKENDURL+"/validUser",{ - username:p.LOGGEDINUSER, - password:p.LOGGEDINHASH, + axios.post(BACKENDURL+"/validUser",{ + username:LOGGEDINUSER, + password:LOGGEDINHASH, recoveryhash:cookies.get("userID") }) .then((data)=>{ if (data.data.verified) { setAvatar(data.data.avatar) - setUsername(p.LOGGEDINUSER) + setUsername(LOGGEDINUSER) } })} - ,[]) + ,[BACKENDURL,LOGGEDINUSER,LOGGEDINHASH]) return (