diff --git a/app/components/Onboarding/Alias.js b/app/components/Onboarding/Alias.js index 41c5c757..ff288136 100644 --- a/app/components/Onboarding/Alias.js +++ b/app/components/Onboarding/Alias.js @@ -1,7 +1,5 @@ -import React, { Component } from 'react' +import React from 'react' import PropTypes from 'prop-types' -import Isvg from 'react-inlinesvg' -import zapLogo from 'icons/zap_logo.svg' import styles from './Alias.scss' const Alias = ({ alias, updateAlias }) => ( @@ -22,4 +20,4 @@ Alias.propTypes = { updateAlias: PropTypes.func.isRequired } -export default Alias \ No newline at end of file +export default Alias diff --git a/app/components/Onboarding/FormContainer.js b/app/components/Onboarding/FormContainer.js index 1e5f756b..8d01c285 100644 --- a/app/components/Onboarding/FormContainer.js +++ b/app/components/Onboarding/FormContainer.js @@ -1,57 +1,55 @@ -import React, { Component } from 'react' +import React from 'react' import PropTypes from 'prop-types' import Isvg from 'react-inlinesvg' import zapLogo from 'icons/zap_logo.svg' import styles from './FormContainer.scss' -const FormContainer = ({ title, description, back, next, children }) => { - return ( -
-
+const FormContainer = ({ title, description, back, next, children }) => ( +
+
-
+
+
+ +
+
+
+ +
+

{title}

+

{description}

+
+ +
+ {children} +
+ +
+
- + { + back &&
Back
+ }
+ { + next &&
Next
+ }
-
- -
-

{title}

-

{description}

+ +
+) -
- {children} -
- -
-
-
- { - back &&
Back
- } -
-
- { - next &&
Next
- } -
-
-
-
- ) -} FormContainer.propTypes = { title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, - + back: PropTypes.func, next: PropTypes.func, - + children: PropTypes.object.isRequired } -export default FormContainer \ No newline at end of file +export default FormContainer diff --git a/app/components/Onboarding/Onboarding.js b/app/components/Onboarding/Onboarding.js index cf011ea7..36950bf1 100644 --- a/app/components/Onboarding/Onboarding.js +++ b/app/components/Onboarding/Onboarding.js @@ -1,7 +1,5 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' -import Isvg from 'react-inlinesvg' -import zapLogo from 'icons/zap_logo.svg' import LoadingBolt from 'components/LoadingBolt' @@ -9,42 +7,37 @@ import FormContainer from './FormContainer' import Alias from './Alias' import styles from './Onboarding.scss' - -class Onboarding extends Component { - render() { - const { - onboarding: { - step, - alias - }, - submit, - aliasProps - } = this.props - - const renderStep = () => { - switch(step) { - case 1: - return ( - submit(alias)} - > - - - ) - default: - return - } +const Onboarding = ({ + onboarding: { + step, + alias + }, + submit, + aliasProps +}) => { + const renderStep = () => { + switch (step) { + case 1: + return ( + submit(alias)} + > + + + ) + default: + return } - - return ( -
- {renderStep()} -
- ) } + + return ( +
+ {renderStep()} +
+ ) } Onboarding.propTypes = { diff --git a/app/components/Onboarding/Syncing.js b/app/components/Onboarding/Syncing.js index 1a8dfa0e..6426e6ae 100644 --- a/app/components/Onboarding/Syncing.js +++ b/app/components/Onboarding/Syncing.js @@ -16,7 +16,7 @@ class Syncing extends Component { return (
- +
@@ -26,7 +26,7 @@ class Syncing extends Component {
-

{isNaN(parseInt(syncPercentage)) || syncPercentage.toString().length === 0 ? '' : `${syncPercentage}%`}

+

{isNaN(parseInt(syncPercentage, 10)) || syncPercentage.toString().length === 0 ? '' : `${syncPercentage}%`}

diff --git a/app/components/Onboarding/index.js b/app/components/Onboarding/index.js index dbd7f88c..cb4cc808 100644 --- a/app/components/Onboarding/index.js +++ b/app/components/Onboarding/index.js @@ -1,3 +1,3 @@ import Onboarding from './Onboarding' -export default Onboarding \ No newline at end of file +export default Onboarding diff --git a/app/containers/Root.js b/app/containers/Root.js index 3bc35d4b..636f0397 100644 --- a/app/containers/Root.js +++ b/app/containers/Root.js @@ -50,14 +50,12 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => { const Root = ({ store, history, - + lnd, onboarding, submit, aliasProps, - syncingProps, - updateAlias, - changeStep, + syncingProps }) => { // If we are syncing show the syncing screen if (!onboarding.onboarded) { @@ -90,8 +88,14 @@ const Root = ({ Root.propTypes = { store: PropTypes.object.isRequired, history: PropTypes.object.isRequired, + lnd: PropTypes.object.isRequired, onboarding: PropTypes.object.isRequired, - syncingProps: PropTypes.object.isRequired + syncingProps: PropTypes.object.isRequired, + aliasProps: PropTypes.object.isRequired, + + submit: PropTypes.func.isRequired, + updateAlias: PropTypes.func.isRequired, + changeStep: PropTypes.func.isRequired } export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(Root)