IT builds again.

master
Joshua Sigona 3 years ago
parent dbc0a878df
commit b8ffa83465
  1. 12
      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 (
<header>

Loading…
Cancel
Save