diff --git a/src/components/RelativePosition.tsx b/src/components/RelativePosition.tsx new file mode 100644 index 0000000..e952463 --- /dev/null +++ b/src/components/RelativePosition.tsx @@ -0,0 +1,15 @@ +import React from "react"; + +type RelativePositionProps = { + pos: React.ReactNode; + total: React.ReactNode; +}; + +const RelativePosition: React.FC = ({ pos, total }) => ( + + {pos} + / {total} + +); + +export default React.memo(RelativePosition); diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index f49b6d1..25dddb5 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -23,6 +23,7 @@ import TokenTransferItem from "../TokenTransferItem"; import { TransactionData, InternalOperation } from "../types"; import PercentageBar from "../components/PercentageBar"; import ExternalLink from "../components/ExternalLink"; +import RelativePosition from "../components/RelativePosition"; type DetailsProps = { txData: TransactionData; @@ -192,8 +193,10 @@ const Details: React.FC = ({
- /{" "} - + } + total={} + />
= ({ N/A {txData.nonce} - - - {txData.transactionIndex} / {txData.blockTransactionCount - 1} - + +