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

fix?

parent b5d7e24e
No related branches found
No related tags found
No related merge requests found
......@@ -18,16 +18,17 @@ export default function MonHumaviron () {
useEffect(() => {
const interval = setInterval(() => {
axios.get('/api/user').then((response) => setUser(response.data));
axios.get(`/api/my_scores?id=${user.login}`).then((response) => setUserData(response.data));
}, 500);
return () => clearInterval(interval);
}, [userData]);
});
useEffect(() => {
/*useEffect(() => {
const interval = setInterval(() => {console.log(`/api/my_scores?id=${user.login}`);
axios.get(`/api/my_scores?id=${user.login}`).then((response) => setUserData(response.data));
}, 500);
return () => clearInterval(interval);
}, [user]);
}, [user]);*/
return (
<MDBContainer className="mt-4">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment