diff --git a/src/execution/ChainInfo.tsx b/src/execution/ChainInfo.tsx index aa90367a..c0674796 100644 --- a/src/execution/ChainInfo.tsx +++ b/src/execution/ChainInfo.tsx @@ -6,25 +6,31 @@ import ChainInfoItem from "../components/ChainInfoItem"; import ContentFrame from "../components/ContentFrame"; import { PendingChainInfoResults } from "../search/PendingResults"; import { useBCInfoStateInfo, useLatestBlockChainInfo } from "../useLatestBlock"; +import { useQuirks } from "../useQuirks"; import { RuntimeContext } from "../useRuntime"; const ChainInfo: FC = () => { - const { zilliqa } = useContext(RuntimeContext); + const { zilliqa, provider } = useContext(RuntimeContext); + const quirks = useQuirks(provider); const latestBlockChainInfo = useLatestBlockChainInfo(zilliqa); const BCInfo = useBCInfoStateInfo(latestBlockChainInfo); + let gridValues = "grid-rows-2 grid-cols-4"; + if (quirks?.isZilliqa1) { + gridValues = "grid-rows-3 grid-cols-4"; + } + gridValues = + "grid items-baseline gap-x-1 border-t border-b border-gray-200 bg-gray-100 text-sm " + + gridValues; // Return a table with rows containing the basic information of the most recent RECENT_SIZE blocks return (
{latestBlockChainInfo ? ( -
+
{ data={latestBlockChainInfo.NumTransactions} /> - - - - - - - - - - - - + {quirks?.isZilliqa1 && ( + + + + )} + {quirks?.isZilliqa1 && ( + + + + )} + {quirks?.isZilliqa1 && ( + + + + )} + {quirks?.isZilliqa1 && ( + + + + )} { data={latestBlockChainInfo.TransactionRate.toFixed(5)} /> - - - - - - + {quirks?.isZilliqa1 && ( + + + + )} + {quirks?.isZilliqa1 && ( + + + + )}