diff --git a/apps/explorer/src/app/components/highlighted-link/index.tsx b/apps/explorer/src/app/components/highlighted-link/index.tsx new file mode 100644 index 000000000..8bd1e027b --- /dev/null +++ b/apps/explorer/src/app/components/highlighted-link/index.tsx @@ -0,0 +1,22 @@ +import { Link } from 'react-router-dom'; + +interface HighlightedLinkProps { + to: string; + text: string | undefined; +} + +export const HighlightedLink = ({ + to, + text, + ...props +}: HighlightedLinkProps) => { + return ( + + {text} + + ); +}; diff --git a/apps/explorer/src/app/components/table/index.tsx b/apps/explorer/src/app/components/table/index.tsx index a75157cb2..30a6fad27 100644 --- a/apps/explorer/src/app/components/table/index.tsx +++ b/apps/explorer/src/app/components/table/index.tsx @@ -55,7 +55,7 @@ export const TableHeader = ({ className, ...props }: TableHeaderProps) => { - const cellClasses = classnames(className, 'pl-4 dark:pl-0', { + const cellClasses = classnames(className, { 'text-left font-normal': props?.scope === 'row', }); return ( diff --git a/apps/explorer/src/app/routes/blocks/id/block.tsx b/apps/explorer/src/app/routes/blocks/id/block.tsx index ddfaa94ae..26f56b989 100644 --- a/apps/explorer/src/app/routes/blocks/id/block.tsx +++ b/apps/explorer/src/app/routes/blocks/id/block.tsx @@ -15,6 +15,7 @@ import { TxsPerBlock } from '../../../components/txs/txs-per-block'; import { Button } from '@vegaprotocol/ui-toolkit'; import { Routes } from '../../router-config'; import { RenderFetched } from '../../../components/render-fetched'; +import { HighlightedLink } from '../../../components/highlighted-link'; const Block = () => { const { block } = useParams<{ block: string }>(); @@ -60,13 +61,11 @@ const Block = () => { Mined by - - {header.proposer_address} - + text={header.proposer_address} + data-testid="block-validator" + /> diff --git a/apps/explorer/src/app/routes/txs/id/tx-details.tsx b/apps/explorer/src/app/routes/txs/id/tx-details.tsx index a85300e6a..475471e89 100644 --- a/apps/explorer/src/app/routes/txs/id/tx-details.tsx +++ b/apps/explorer/src/app/routes/txs/id/tx-details.tsx @@ -1,4 +1,5 @@ -import { Link } from 'react-router-dom'; +import { Routes } from '../../router-config'; +import { Result } from '../tendermint-transaction-response.d'; import { TableWithTbody, TableCell, @@ -6,8 +7,7 @@ import { TableRow, } from '../../../components/table'; import { TruncateInline } from '../../../components/truncate/truncate'; -import { Routes } from '../../router-config'; -import { Result } from '../tendermint-transaction-response.d'; +import { HighlightedLink } from '../../../components/highlighted-link'; interface TxDetailsProps { txData: Result | undefined; @@ -35,23 +35,16 @@ export const TxDetails = ({ txData, pubKey, className }: TxDetailsProps) => { Submitted by - - {pubKey} - + Block - - {txData.height} - + text={txData.height} + />