diff --git a/embark-ui/src/components/CardTitleIdenticon.js b/embark-ui/src/components/CardTitleIdenticon.js index e34d8886..0febddc1 100644 --- a/embark-ui/src/components/CardTitleIdenticon.js +++ b/embark-ui/src/components/CardTitleIdenticon.js @@ -1,9 +1,17 @@ +import PropTypes from "prop-types"; import React from 'react'; import {CardTitle} from 'reactstrap'; import Blockies from 'react-blockies'; const CardTitleIdenticon = ({id, children}) => ( - {children} -) + + {children} + +); -export default CardTitleIdenticon +CardTitleIdenticon.propTypes = { + id: PropTypes.string, + children: PropTypes.object +}; + +export default CardTitleIdenticon; diff --git a/embark-ui/src/components/Explorer.css b/embark-ui/src/components/Explorer.css index 29e9480d..d3cb3b64 100644 --- a/embark-ui/src/components/Explorer.css +++ b/embark-ui/src/components/Explorer.css @@ -7,3 +7,8 @@ .dark-theme .explorer-row { border-bottom-color: #23282c; } + +.explorer-row .text-truncate { + width: 90%; + display: inline-block; +} diff --git a/embark-ui/src/components/Transactions.js b/embark-ui/src/components/Transactions.js index afe78984..643bf341 100644 --- a/embark-ui/src/components/Transactions.js +++ b/embark-ui/src/components/Transactions.js @@ -4,48 +4,54 @@ import {Row, Col, Card, CardHeader, CardBody} from 'reactstrap'; import PropTypes from 'prop-types'; import CardTitleIdenticon from './CardTitleIdenticon'; +import LoadMore from "./LoadMore"; -const Transactions = ({transactions}) => ( +const Transactions = ({transactions, showLoadMore, loadMore}) => ( -

Transactions

- {transactions.map(transaction => ( - - - Transaction  - - {transaction.hash} - - - - - - - Block number -
{transaction.blockNumber}
- - - From -
{transaction.from}
- - - To -
{transaction.to}
- - - Type -
{transaction.to ? "Contract Call" : "Contract Creation"}
- -
-
-
- ))} + + +

Transactions

+
+ + {transactions.map(transaction => ( +
+ Transaction  + + {transaction.hash} + + + + + Block number +
{transaction.blockNumber}
+ + + From +
{transaction.from}
+ + + To +
{transaction.to}
+ + + Type +
{transaction.to ? "Contract Call" : "Contract Creation"}
+ +
+
+ ))} + {showLoadMore && loadMore()} />} +
+
); Transactions.propTypes = { - transactions: PropTypes.arrayOf(PropTypes.object) + transactions: PropTypes.arrayOf(PropTypes.object), + showLoadMore: PropTypes.bool, + loadMore: PropTypes.func }; export default Transactions; diff --git a/embark-ui/src/containers/TransactionsContainer.js b/embark-ui/src/containers/TransactionsContainer.js index b50807c3..ef6c107e 100644 --- a/embark-ui/src/containers/TransactionsContainer.js +++ b/embark-ui/src/containers/TransactionsContainer.js @@ -3,6 +3,7 @@ import {connect} from 'react-redux'; import PropTypes from 'prop-types'; import {transactions as transactionsAction, initBlockHeader, stopBlockHeader} from '../actions'; +import Blocks from "../components/Blocks"; import LoadMore from "../components/LoadMore"; import Transactions from '../components/Transactions'; import DataWrapper from "../components/DataWrapper"; @@ -34,9 +35,9 @@ class TransactionsContainer extends Component { return ( 0} {...this.props} render={({transactions}) => ( - + = 0)} loadMore={() => this.loadMore()} /> )} /> - {(this.loadMoreFrom() > 0) ? this.loadMore()} /> : } ); }