Browse Source

fix(lint): linting errors

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
22f4eb09d0
  1. 4
      app/components/Onboarding/Alias.js
  2. 12
      app/components/Onboarding/FormContainer.js
  3. 13
      app/components/Onboarding/Onboarding.js
  4. 2
      app/components/Onboarding/Syncing.js
  5. 12
      app/containers/Root.js

4
app/components/Onboarding/Alias.js

@ -1,7 +1,5 @@
import React, { Component } from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Isvg from 'react-inlinesvg'
import zapLogo from 'icons/zap_logo.svg'
import styles from './Alias.scss' import styles from './Alias.scss'
const Alias = ({ alias, updateAlias }) => ( const Alias = ({ alias, updateAlias }) => (

12
app/components/Onboarding/FormContainer.js

@ -1,11 +1,10 @@
import React, { Component } from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Isvg from 'react-inlinesvg' import Isvg from 'react-inlinesvg'
import zapLogo from 'icons/zap_logo.svg' import zapLogo from 'icons/zap_logo.svg'
import styles from './FormContainer.scss' import styles from './FormContainer.scss'
const FormContainer = ({ title, description, back, next, children }) => { const FormContainer = ({ title, description, back, next, children }) => (
return (
<div className={styles.container}> <div className={styles.container}>
<div className={styles.titleBar} /> <div className={styles.titleBar} />
@ -13,8 +12,7 @@ const FormContainer = ({ title, description, back, next, children }) => {
<section> <section>
<Isvg src={zapLogo} /> <Isvg src={zapLogo} />
</section> </section>
<section> <section />
</section>
</header> </header>
<div className={styles.info}> <div className={styles.info}>
@ -41,8 +39,8 @@ const FormContainer = ({ title, description, back, next, children }) => {
</div> </div>
</footer> </footer>
</div> </div>
) )
}
FormContainer.propTypes = { FormContainer.propTypes = {
title: PropTypes.string.isRequired, title: PropTypes.string.isRequired,

13
app/components/Onboarding/Onboarding.js

@ -1,7 +1,5 @@
import React, { Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import Isvg from 'react-inlinesvg'
import zapLogo from 'icons/zap_logo.svg'
import LoadingBolt from 'components/LoadingBolt' import LoadingBolt from 'components/LoadingBolt'
@ -9,20 +7,16 @@ import FormContainer from './FormContainer'
import Alias from './Alias' import Alias from './Alias'
import styles from './Onboarding.scss' import styles from './Onboarding.scss'
const Onboarding = ({
class Onboarding extends Component {
render() {
const {
onboarding: { onboarding: {
step, step,
alias alias
}, },
submit, submit,
aliasProps aliasProps
} = this.props }) => {
const renderStep = () => { const renderStep = () => {
switch(step) { switch (step) {
case 1: case 1:
return ( return (
<FormContainer <FormContainer
@ -44,7 +38,6 @@ class Onboarding extends Component {
{renderStep()} {renderStep()}
</div> </div>
) )
}
} }
Onboarding.propTypes = { Onboarding.propTypes = {

2
app/components/Onboarding/Syncing.js

@ -26,7 +26,7 @@ class Syncing extends Component {
<div className={styles.progressBar}> <div className={styles.progressBar}>
<div className={styles.progress} style={{ width: isNaN(syncPercentage) ? 0 : `${syncPercentage}%` }} /> <div className={styles.progress} style={{ width: isNaN(syncPercentage) ? 0 : `${syncPercentage}%` }} />
</div> </div>
<h4>{isNaN(parseInt(syncPercentage)) || syncPercentage.toString().length === 0 ? '' : `${syncPercentage}%`}</h4> <h4>{isNaN(parseInt(syncPercentage, 10)) || syncPercentage.toString().length === 0 ? '' : `${syncPercentage}%`}</h4>
</section> </section>
</div> </div>
</div> </div>

12
app/containers/Root.js

@ -55,9 +55,7 @@ const Root = ({
onboarding, onboarding,
submit, submit,
aliasProps, aliasProps,
syncingProps, syncingProps
updateAlias,
changeStep,
}) => { }) => {
// If we are syncing show the syncing screen // If we are syncing show the syncing screen
if (!onboarding.onboarded) { if (!onboarding.onboarded) {
@ -90,8 +88,14 @@ const Root = ({
Root.propTypes = { Root.propTypes = {
store: PropTypes.object.isRequired, store: PropTypes.object.isRequired,
history: PropTypes.object.isRequired, history: PropTypes.object.isRequired,
lnd: PropTypes.object.isRequired,
onboarding: 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) export default connect(mapStateToProps, mapDispatchToProps, mergeProps)(Root)

Loading…
Cancel
Save