import React from "react"; type TransactionTypeProps = { type: number; }; const TransactionType: React.FC = ({ type }) => { let description: string; switch (type) { case 0: description = "legacy"; break; case 1: description = "EIP-2930"; break; case 2: description = "EIP-1559"; break; default: description = "unknown"; } return ( {type} ({description}) ); }; export default React.memo(TransactionType);