diff --git a/src/components/BlockConfirmations.tsx b/src/components/BlockConfirmations.tsx new file mode 100644 index 0000000..4846d09 --- /dev/null +++ b/src/components/BlockConfirmations.tsx @@ -0,0 +1,16 @@ +import React from "react"; + +type BlockConfirmationsProps = { + confirmations: number; +}; + +const BlockConfirmations: React.FC = ({ + confirmations, +}) => ( + + {confirmations} Block{" "} + {confirmations === 1 ? "Confirmation" : "Confirmations"} + +); + +export default React.memo(BlockConfirmations); diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index 4204908..30bcbbd 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -8,6 +8,7 @@ import { import ContentFrame from "../ContentFrame"; import InfoRow from "../components/InfoRow"; import BlockLink from "../components/BlockLink"; +import BlockConfirmations from "../components/BlockConfirmations"; import AddressHighlighter from "../components/AddressHighlighter"; import DecoratedAddressLink from "../components/DecoratedAddressLink"; import Copy from "../components/Copy"; @@ -53,9 +54,7 @@ const Details: React.FC = ({
- - {txData.confirmations} Block Confirmations - +
diff --git a/src/transaction/Logs.tsx b/src/transaction/Logs.tsx index f965ecc..b81fd9d 100644 --- a/src/transaction/Logs.tsx +++ b/src/transaction/Logs.tsx @@ -21,7 +21,7 @@ const Logs: React.FC = ({ txData }) => (
Address
-
+