import React, { useContext } from "react"; import ContentFrame from "./ContentFrame"; import PageControl from "./search/PageControl"; import ResultHeader from "./search/ResultHeader"; import PendingResults from "./search/PendingResults"; import TransactionItem from "./search/TransactionItem"; import { useFeeToggler } from "./search/useFeeToggler"; import { RuntimeContext } from "./useRuntime"; import { SelectionContext, useSelection } from "./useSelection"; import { useENSCache } from "./useReverseCache"; import { ProcessedTransaction } from "./types"; import { PAGE_SIZE } from "./params"; type BlockTransactionResultsProps = { page?: ProcessedTransaction[]; total: number; pageNumber: number; }; const BlockTransactionResults: React.FC = ({ page, total, pageNumber, }) => { const selectionCtx = useSelection(); const [feeDisplay, feeDisplayToggler] = useFeeToggler(); const { provider } = useContext(RuntimeContext); const reverseCache = useENSCache(provider, page); return (
{page === undefined ? ( <>Waiting for search results... ) : ( <>A total of {total} transactions found )}
{page ? ( {page.map((tx) => ( ))}
A total of {total} transactions found
) : ( )}
); }; export default React.memo(BlockTransactionResults);