2018-08-02 13:52:10 -04:00
|
|
|
import React from 'react';
|
2018-08-03 12:29:33 -04:00
|
|
|
import {
|
|
|
|
Page,
|
|
|
|
Grid,
|
|
|
|
Card,
|
|
|
|
Table
|
|
|
|
} from "tabler-react";
|
2018-08-02 13:52:10 -04:00
|
|
|
import {Link} from 'react-router-dom';
|
|
|
|
|
|
|
|
const Contracts = ({contracts}) => (
|
2018-08-03 12:29:33 -04:00
|
|
|
<Page.Content title="Contracts">
|
|
|
|
<Grid.Row>
|
|
|
|
<Grid.Col>
|
|
|
|
<Card>
|
|
|
|
<Table
|
|
|
|
responsive
|
|
|
|
className="card-table table-vcenter text-nowrap"
|
|
|
|
headerItems={[
|
|
|
|
{content: "Name"},
|
|
|
|
{content: "Address"},
|
|
|
|
{content: "State"}
|
|
|
|
]}
|
|
|
|
bodyItems={
|
|
|
|
contracts.map((contract) => {
|
|
|
|
return ([
|
|
|
|
{content: <Link to={`contracts/${contract.name}`}>{contract.name}</Link>},
|
|
|
|
{content: contract.address},
|
|
|
|
{content: contract.deploy}
|
|
|
|
]);
|
|
|
|
})
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</Card>
|
|
|
|
</Grid.Col>
|
|
|
|
</Grid.Row>
|
|
|
|
</Page.Content>
|
2018-08-02 13:52:10 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
export default Contracts;
|
|
|
|
|