Skip to content

Commit

Permalink
fix(home):api-call
Browse files Browse the repository at this point in the history
  • Loading branch information
AswinAsok committed Dec 12, 2023
1 parent f222ae5 commit 18d5429
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Pages/Home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ const MuLiveCounter = () => {
"wss://mulearn.org/ws/v1/public/landing-stats/"
);

socket.addEventListener("open", (event) => console.log("connected"));

socket.addEventListener("message", (event) => {
setCounts(JSON.parse(event.data));
console.log("Message from server ", event.data)
});

socket.addEventListener("error", (event) => {
Expand All @@ -52,7 +51,7 @@ const MuLiveCounter = () => {
});
}
};
}, [counts]);
}, []);

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

0 comments on commit 18d5429

Please sign in to comment.