Enable rich info on InfoRow component title; add EIP hyperlink to tx type
This commit is contained in:
parent
873541ec64
commit
8cacd01f42
|
@ -13,9 +13,9 @@ const ExternalLink: React.FC<ExternalLinkProps> = ({ href, children }) => (
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
<span className="inline-flex items-center space-x-1">
|
<span className="inline-flex items-baseline space-x-1">
|
||||||
<span>{children}</span>
|
<span>{children}</span>
|
||||||
<FontAwesomeIcon icon={faExternalLinkAlt} size="1x" />
|
<FontAwesomeIcon icon={faExternalLinkAlt} size="sm" />
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
type InfoRowProps = React.PropsWithChildren<{
|
type InfoRowProps = React.PropsWithChildren<{
|
||||||
title: string;
|
title: React.ReactNode;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
const InfoRow: React.FC<InfoRowProps> = ({ title, children }) => (
|
const InfoRow: React.FC<InfoRowProps> = ({ title, children }) => (
|
||||||
|
|
|
@ -21,6 +21,7 @@ import FormattedBalance from "../components/FormattedBalance";
|
||||||
import TokenTransferItem from "../TokenTransferItem";
|
import TokenTransferItem from "../TokenTransferItem";
|
||||||
import { TransactionData, InternalOperation } from "../types";
|
import { TransactionData, InternalOperation } from "../types";
|
||||||
import PercentageBar from "../components/PercentageBar";
|
import PercentageBar from "../components/PercentageBar";
|
||||||
|
import ExternalLink from "../components/ExternalLink";
|
||||||
|
|
||||||
type DetailsProps = {
|
type DetailsProps = {
|
||||||
txData: TransactionData;
|
txData: TransactionData;
|
||||||
|
@ -132,7 +133,17 @@ const Details: React.FC<DetailsProps> = ({
|
||||||
{ethers.utils.formatEther(txData.value)} Ether
|
{ethers.utils.formatEther(txData.value)} Ether
|
||||||
</span>
|
</span>
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
<InfoRow title="Type (EIP-2718)">
|
<InfoRow
|
||||||
|
title={
|
||||||
|
<>
|
||||||
|
Type (
|
||||||
|
<ExternalLink href="https://eips.ethereum.org/EIPS/eip-2718">
|
||||||
|
EIP-2718
|
||||||
|
</ExternalLink>
|
||||||
|
)
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
>
|
||||||
<TransactionType type={txData.type} />
|
<TransactionType type={txData.type} />
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
{txData.blockBaseFeePerGas && (
|
{txData.blockBaseFeePerGas && (
|
||||||
|
|
Loading…
Reference in New Issue