diff --git a/app/js/components/App.js b/app/js/components/App.js index 63c8e2a..c015409 100644 --- a/app/js/components/App.js +++ b/app/js/components/App.js @@ -1,4 +1,19 @@ +import React from 'react'; + export default function App(props) { - return `Hello World ${props.account}`; + if (!props.initialized) { + return "initializing..."; + } + + if (props.error) { + return <> +

Error: {props.error}

+ ; + } + + return <> +

Network ID {props.networkID}

+

Hello {props.account}

+ ; } diff --git a/app/js/containers/App.js b/app/js/containers/App.js index 79ab5f2..f4b7ae4 100644 --- a/app/js/containers/App.js +++ b/app/js/containers/App.js @@ -2,7 +2,10 @@ import { connect } from 'react-redux'; import App from '../components/App'; const mapStateToProps = state => ({ + initialized: state.web3.networkID, + networkID: state.web3.networkID, account: state.web3.account, + error: state.web3.error, }); const mapDispatchToProps = dispatch => ({