Adding link

This commit is contained in:
Anthony Laibe 2018-08-06 09:40:17 +01:00 committed by Pascal Precht
parent 548b194224
commit f98c9b5578
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
3 changed files with 8 additions and 6 deletions

View File

@ -5,9 +5,9 @@ import {
Card,
Table
} from "tabler-react";
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
const Accounts = ({accounts}) => (
<Page.Content title="Accounts">
<Grid.Row>
@ -25,7 +25,7 @@ const Accounts = ({accounts}) => (
bodyItems={
accounts.map((account) => {
return ([
{content: account.address},
{content: <Link to={`/embark/explorer/accounts/${account.address}`}>{account.address}</Link>},
{content: account.balance},
{content: account.transactionCount},
{content: account.index}

View File

@ -1,4 +1,5 @@
import React from 'react';
import {Link} from "react-router-dom";
import {
Page,
Grid,
@ -20,7 +21,7 @@ const Blocks = ({blocks}) => (
bodyItems={
blocks.map((block) => {
return ([
{content: block.number},
{content: <Link to={`/embark/explorer/blocks/${block.number}`}>{block.number}</Link>},
{content: new Date(block.timestamp * 1000).toLocaleString()},
{content: block.gasUsed},
{content: block.transactions.length}

View File

@ -1,4 +1,5 @@
import React from 'react';
import {Link} from "react-router-dom";
import {
Page,
Grid,
@ -16,20 +17,20 @@ const Transactions = ({transactions}) => (
responsive
className="card-table table-vcenter text-nowrap"
headerItems={[
{content: "Hash"},
{content: "Block Number"},
{content: "From"},
{content: "To"},
{content: "Type"},
{content: "Hash"}
{content: "Type"}
]}
bodyItems={
transactions.map((transaction) => {
return ([
{content: <Link to={`/embark/explorer/transactions/${transaction.hash}`}>{transaction.hash}</Link>},
{content: transaction.blockNumber},
{content: transaction.from},
{content: transaction.to},
{content: transaction.to ? "Contract Call" : "Contract Creation"},
{content: transaction.hash}
]);
})
}