Skip to content
Snippets Groups Projects
Commit f5ba6fb9 authored by Thomas Bouquet's avatar Thomas Bouquet
Browse files

fix?

parent 1bd660b5
Branches
No related tags found
No related merge requests found
...@@ -15,10 +15,16 @@ export default function MonHumaviron () { ...@@ -15,10 +15,16 @@ export default function MonHumaviron () {
}, []); }, []);
console.log(user.login); console.log(user.login);
var [userData,setUserData] = useState([]); var [userData,setUserData] = useState({
dataperf: [],
distTotale: 0,
distMax: 0,
nbScores: 0,
distMoy: 0,
});
useEffect(() => { useEffect(() => {
const interval = setInterval(() => { const interval = setInterval(() => {
axios.get("/api/my_scores?id="+user.login+"").then((response) => setUserData(response.data)); axios.get("/api/my_scores?id=2019bouquett"/*+user.login*/).then((response) => setUserData(response.data));
}, 500); }, 500);
return () => clearInterval(interval); return () => clearInterval(interval);
}, []); }, []);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment