From bc0a89fd6d1d2b9473d7d664ea060f851621d05d Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 24 Oct 2018 10:45:06 -0400 Subject: [PATCH] conflict in transactions --- .../src/components/CardTitleIdenticon.js | 14 +++- embark-ui/src/components/Explorer.css | 5 ++ embark-ui/src/components/Transactions.js | 74 ++++++++++--------- .../src/containers/TransactionsContainer.js | 5 +- 4 files changed, 59 insertions(+), 39 deletions(-) diff --git a/embark-ui/src/components/CardTitleIdenticon.js b/embark-ui/src/components/CardTitleIdenticon.js index e34d88863..0febddc1b 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 29e9480df..d3cb3b64b 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 afe789840..643bf3419 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 b50807c33..ef6c107e4 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()} /> : } ); }