diff --git a/app/components/Onboarding/Onboarding.js b/app/components/Onboarding/Onboarding.js index 36950bf1..34ae5d46 100644 --- a/app/components/Onboarding/Onboarding.js +++ b/app/components/Onboarding/Onboarding.js @@ -1,4 +1,4 @@ -import React, { Component } from 'react' +import React from 'react' import PropTypes from 'prop-types' import LoadingBolt from 'components/LoadingBolt' diff --git a/app/containers/Root.js b/app/containers/Root.js index 636f0397..f2a922ec 100644 --- a/app/containers/Root.js +++ b/app/containers/Root.js @@ -20,8 +20,8 @@ const mapDispatchToProps = { } const mapStateToProps = state => ({ - onboarding: state.onboarding, lnd: state.lnd, + onboarding: state.onboarding, syncPercentage: lndSelectors.syncPercentage(state) }) @@ -37,12 +37,18 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { alias: stateProps.onboarding.alias } + const onboardingProps = { + onboarding: stateProps.onboarding, + submit: dispatchProps.submit, + aliasProps + } + return { ...stateProps, ...dispatchProps, ...ownProps, - aliasProps, + onboardingProps, syncingProps } } @@ -52,20 +58,12 @@ const Root = ({ history, lnd, - onboarding, - submit, - aliasProps, + onboardingProps, syncingProps }) => { // If we are syncing show the syncing screen - if (!onboarding.onboarded) { - return ( - - ) + if (!onboardingProps.onboarding.onboarded) { + return } // If we are syncing show the syncing screen @@ -89,13 +87,8 @@ Root.propTypes = { store: PropTypes.object.isRequired, history: PropTypes.object.isRequired, lnd: PropTypes.object.isRequired, - onboarding: PropTypes.object.isRequired, - syncingProps: PropTypes.object.isRequired, - aliasProps: PropTypes.object.isRequired, - - submit: PropTypes.func.isRequired, - updateAlias: PropTypes.func.isRequired, - changeStep: PropTypes.func.isRequired + onboardingProps: PropTypes.object.isRequired, + syncingProps: PropTypes.object.isRequired } export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(Root)