Skip to content

Commit

Permalink
Temp, #925
Browse files Browse the repository at this point in the history
  • Loading branch information
wliyongfeng committed Nov 6, 2024
1 parent 9a6c9ca commit 9d8d06b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions site/src/hooks/overview/useLatestBlocks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { useInterval } from "react-use";
import { getEnvChain } from "../../utils/env";
import chains from "../../utils/consts/chains";
import { useDispatch } from "react-redux";
import { useCallback } from "react";

export default function useLatestBlocks() {
const chain = getEnvChain();
const isRelay = [chains.polkadot.value, chains.kusama.value].includes(chain);
const dispatch = useDispatch();

const fetchBlocks = useCallback(() => {}, []);

useInterval(() => {}, isRelay ? 6000 : 12000);
}

0 comments on commit 9d8d06b

Please sign in to comment.