瀏覽代碼

Explorer - fetch stats on first load

Justin Schuldt 3 年之前
父節點
當前提交
d26e2b85b1
共有 1 個文件被更改,包括 2 次插入1 次删除
  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);