Skip to content
This repository was archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
feat: timestamp tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnygleason committed Oct 31, 2019
1 parent f9daf21 commit 623ba13
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/v2/components/Blocks/Table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ const BlocksTable = ({
<Link to={`/blocks/${block.id}`}>{block.id}</Link>
</TableCell>
<TableCell width={100}>{block.slot}</TableCell>
<TableCell width={140}>{asTime(block.timestamp)}</TableCell>
<TableCell width={140} title={block.timestamp}>
{asTime(block.timestamp)}
</TableCell>
<TableCell width={200}>TODO</TableCell>
<TableCell width={140}>TODO</TableCell>
<TableCell>
Expand Down
14 changes: 11 additions & 3 deletions src/v2/components/Transactions/Detail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const TransactionDetail = ({match}: {match: Match}) => {
},
{
label: 'Block',
hint: '',
hint: transaction.blockId,
value() {
return (
<Link to={`/blocks/${transaction.blockId}`}>
Expand All @@ -80,13 +80,21 @@ const TransactionDetail = ({match}: {match: Match}) => {
},
];

const renderSpec = ({label, value}: {label: string, value: string}) => (
const renderSpec = ({
label,
hint,
value,
}: {
label: string,
hint: string,
value: string,
}) => (
<li key={label}>
<div className={classes.label}>
{label}
<HelpLink term="" text="" />
</div>
<div className={classes.value}>
<div className={classes.value} title={hint}>
{typeof value === 'function' ? value() : value}
</div>
</li>
Expand Down
4 changes: 3 additions & 1 deletion src/v2/components/Transactions/Table/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ const TransactionsTable = ({
{transaction.blockId}
</Link>
</TableCell>
<TableCell width={135}>{asTime(transaction.timestamp)}</TableCell>
<TableCell width={135} title={transaction.timestamp}>
{asTime(transaction.timestamp)}
</TableCell>
<TableCell width={230}>
<Link
to={`/programs/${transaction.instructions[0].programId}`}
Expand Down

0 comments on commit 623ba13

Please sign in to comment.