Skip to content

Commit

Permalink
timer
Browse files Browse the repository at this point in the history
  • Loading branch information
xsteadybcgo committed Aug 31, 2021
1 parent d3bf474 commit 72a81e7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ const Home: React.FC = (): ReactElement => {
useEffect(() => {
setLoaded(true)
apiGetTotalStatics().then((data) => setTotal(data.request))
// const timer = setInterval(() => {
// apiGetTotalStatics().then((data) => setTotal(data.request))
// }, 1200)
// return () => clearInterval(timer)
const timer = setInterval(() => {
apiGetTotalStatics().then((data) => setTotal(data.request))
}, 1200)
return () => clearInterval(timer)
}, [])

useEffect(() => {
Expand Down

0 comments on commit 72a81e7

Please sign in to comment.