Skip to content

Commit

Permalink
fix(home):fix-counts
Browse files Browse the repository at this point in the history
  • Loading branch information
AswinAsok committed Nov 21, 2023
1 parent 3e4a966 commit 629f06b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Pages/Home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,18 @@ const MuLiveCounter = () => {

return () => {
socket.close();
if (!counts) {
fetch("https://mulearn.org/api/v1/get-log/global-count/")
.then((response) => response.json())
.then((data) => {
setCounts(data.response);
})
.catch((error) => {
console.error("Error:", error);
});
}
};
}, []);
}, [counts]);

return (
<div className={styles.rightside}>
Expand Down

0 comments on commit 629f06b

Please sign in to comment.