Adding link
This commit is contained in:
parent
548b194224
commit
f98c9b5578
|
@ -5,9 +5,9 @@ import {
|
||||||
Card,
|
Card,
|
||||||
Table
|
Table
|
||||||
} from "tabler-react";
|
} from "tabler-react";
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
|
|
||||||
const Accounts = ({accounts}) => (
|
const Accounts = ({accounts}) => (
|
||||||
<Page.Content title="Accounts">
|
<Page.Content title="Accounts">
|
||||||
<Grid.Row>
|
<Grid.Row>
|
||||||
|
@ -25,7 +25,7 @@ const Accounts = ({accounts}) => (
|
||||||
bodyItems={
|
bodyItems={
|
||||||
accounts.map((account) => {
|
accounts.map((account) => {
|
||||||
return ([
|
return ([
|
||||||
{content: account.address},
|
{content: <Link to={`/embark/explorer/accounts/${account.address}`}>{account.address}</Link>},
|
||||||
{content: account.balance},
|
{content: account.balance},
|
||||||
{content: account.transactionCount},
|
{content: account.transactionCount},
|
||||||
{content: account.index}
|
{content: account.index}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import {Link} from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
Page,
|
Page,
|
||||||
Grid,
|
Grid,
|
||||||
|
@ -20,7 +21,7 @@ const Blocks = ({blocks}) => (
|
||||||
bodyItems={
|
bodyItems={
|
||||||
blocks.map((block) => {
|
blocks.map((block) => {
|
||||||
return ([
|
return ([
|
||||||
{content: block.number},
|
{content: <Link to={`/embark/explorer/blocks/${block.number}`}>{block.number}</Link>},
|
||||||
{content: new Date(block.timestamp * 1000).toLocaleString()},
|
{content: new Date(block.timestamp * 1000).toLocaleString()},
|
||||||
{content: block.gasUsed},
|
{content: block.gasUsed},
|
||||||
{content: block.transactions.length}
|
{content: block.transactions.length}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import {Link} from "react-router-dom";
|
||||||
import {
|
import {
|
||||||
Page,
|
Page,
|
||||||
Grid,
|
Grid,
|
||||||
|
@ -16,20 +17,20 @@ const Transactions = ({transactions}) => (
|
||||||
responsive
|
responsive
|
||||||
className="card-table table-vcenter text-nowrap"
|
className="card-table table-vcenter text-nowrap"
|
||||||
headerItems={[
|
headerItems={[
|
||||||
|
{content: "Hash"},
|
||||||
{content: "Block Number"},
|
{content: "Block Number"},
|
||||||
{content: "From"},
|
{content: "From"},
|
||||||
{content: "To"},
|
{content: "To"},
|
||||||
{content: "Type"},
|
{content: "Type"}
|
||||||
{content: "Hash"}
|
|
||||||
]}
|
]}
|
||||||
bodyItems={
|
bodyItems={
|
||||||
transactions.map((transaction) => {
|
transactions.map((transaction) => {
|
||||||
return ([
|
return ([
|
||||||
|
{content: <Link to={`/embark/explorer/transactions/${transaction.hash}`}>{transaction.hash}</Link>},
|
||||||
{content: transaction.blockNumber},
|
{content: transaction.blockNumber},
|
||||||
{content: transaction.from},
|
{content: transaction.from},
|
||||||
{content: transaction.to},
|
{content: transaction.to},
|
||||||
{content: transaction.to ? "Contract Call" : "Contract Creation"},
|
{content: transaction.to ? "Contract Call" : "Contract Creation"},
|
||||||
{content: transaction.hash}
|
|
||||||
]);
|
]);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue