Parcourir la source

Explorer - fetch stats on first load

Justin Schuldt il y a 3 ans
Parent
commit
d26e2b85b1
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      explorer/src/pages/index.tsx

+ 2 - 1
explorer/src/pages/index.tsx

@@ -112,7 +112,8 @@ const IndexPage = ({ location }: PageProps) => {
   }
 
   useEffect(() => {
-    statsInterval = setInterval(fetchStats, 30000)
+    fetchStats()  // fetchStats on first load
+    statsInterval = setInterval(fetchStats, 30000) // fetch every 30 seconds
 
     gsap.registerPlugin(ScrollTrigger);