Browse Source

fix(lint): fix lint errors

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
410b7ba07d
  1. 2
      app/components/Onboarding/Onboarding.js
  2. 33
      app/containers/Root.js

2
app/components/Onboarding/Onboarding.js

@ -1,4 +1,4 @@
import React, { Component } from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import LoadingBolt from 'components/LoadingBolt' import LoadingBolt from 'components/LoadingBolt'

33
app/containers/Root.js

@ -20,8 +20,8 @@ const mapDispatchToProps = {
} }
const mapStateToProps = state => ({ const mapStateToProps = state => ({
onboarding: state.onboarding,
lnd: state.lnd, lnd: state.lnd,
onboarding: state.onboarding,
syncPercentage: lndSelectors.syncPercentage(state) syncPercentage: lndSelectors.syncPercentage(state)
}) })
@ -37,12 +37,18 @@ const mergeProps = (stateProps, dispatchProps, ownProps) => {
alias: stateProps.onboarding.alias alias: stateProps.onboarding.alias
} }
const onboardingProps = {
onboarding: stateProps.onboarding,
submit: dispatchProps.submit,
aliasProps
}
return { return {
...stateProps, ...stateProps,
...dispatchProps, ...dispatchProps,
...ownProps, ...ownProps,
aliasProps, onboardingProps,
syncingProps syncingProps
} }
} }
@ -52,20 +58,12 @@ const Root = ({
history, history,
lnd, lnd,
onboarding, onboardingProps,
submit,
aliasProps,
syncingProps syncingProps
}) => { }) => {
// If we are syncing show the syncing screen // If we are syncing show the syncing screen
if (!onboarding.onboarded) { if (!onboardingProps.onboarding.onboarded) {
return ( return <Onboarding {...onboardingProps} />
<Onboarding
onboarding={onboarding}
submit={submit}
aliasProps={aliasProps}
/>
)
} }
// If we are syncing show the syncing screen // If we are syncing show the syncing screen
@ -89,13 +87,8 @@ Root.propTypes = {
store: PropTypes.object.isRequired, store: PropTypes.object.isRequired,
history: PropTypes.object.isRequired, history: PropTypes.object.isRequired,
lnd: PropTypes.object.isRequired, lnd: PropTypes.object.isRequired,
onboarding: PropTypes.object.isRequired, onboardingProps: 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) export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(Root)

Loading…
Cancel
Save