otterscan/src/components/BlockConfirmations.tsx
2021-07-23 01:28:44 -03:00

17 lines
406 B
TypeScript

import React from "react";
type BlockConfirmationsProps = {
confirmations: number;
};
const BlockConfirmations: React.FC<BlockConfirmationsProps> = ({
confirmations,
}) => (
<span className="rounded text-xs bg-gray-100 text-gray-500 px-2 py-1">
{confirmations} Block{" "}
{confirmations === 1 ? "Confirmation" : "Confirmations"}
</span>
);
export default React.memo(BlockConfirmations);