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

fix?

parent d27d8ff3
No related branches found
No related tags found
No related merge requests found
...@@ -15,16 +15,10 @@ export default function MonHumaviron () { ...@@ -15,16 +15,10 @@ 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=".concat(user.login)).then((response) => setUserData(response.data)); axios.get("/api/my_scores?id="+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