Browse Source

fix(lint): fix linting errors

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
642c61db44
  1. 22
      app/components/ModalRoot/SuccessfulSendPayment.js
  2. 2
      app/reducers/ipc.js
  3. 15
      test/components/ModalRoot.spec.js

22
app/components/ModalRoot/SuccessfulSendPayment.js

@ -1,23 +1,19 @@
import { shell } from 'electron'
import React from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import AnimatedCheckmark from 'components/AnimatedCheckmark' import AnimatedCheckmark from 'components/AnimatedCheckmark'
import { btc } from 'utils'
import styles from './SuccessfulSendPayment.scss' import styles from './SuccessfulSendPayment.scss'
const SuccessfulSendPayment = ({ hideModal }) => { const SuccessfulSendPayment = ({ hideModal }) => (
return ( <div className={styles.container}>
<div className={styles.container}> <AnimatedCheckmark />
<AnimatedCheckmark /> <h1>
<h1> <span>Successfully sent payment</span>&nbsp;
<span>Successfully sent payment</span>&nbsp; </h1>
</h1> <div className={styles.button} onClick={hideModal}>
<div className={styles.button} onClick={hideModal}>
Done Done
</div>
</div> </div>
) </div>
} )
SuccessfulSendPayment.propTypes = { SuccessfulSendPayment.propTypes = {
hideModal: PropTypes.func.isRequired hideModal: PropTypes.func.isRequired

2
app/reducers/ipc.js

@ -48,7 +48,7 @@ const ipc = createIpc({
receiveBalance, receiveBalance,
lightningPaymentUri, lightningPaymentUri,
paymentSuccessful, paymentSuccessful,
channelSuccessful, channelSuccessful,

15
test/components/ModalRoot.spec.js

@ -2,6 +2,7 @@ import React from 'react'
import { shallow } from 'enzyme' import { shallow } from 'enzyme'
import ModalRoot from '../../app/components/ModalRoot' import ModalRoot from '../../app/components/ModalRoot'
import SuccessfulSendCoins from '../../app/components/ModalRoot/SuccessfulSendCoins' import SuccessfulSendCoins from '../../app/components/ModalRoot/SuccessfulSendCoins'
import SuccessfulSendPayment from '../../app/components/ModalRoot/SuccessfulSendPayment'
const defaultProps = { const defaultProps = {
hideModal: () => {}, hideModal: () => {},
@ -32,4 +33,16 @@ describe('SuccessfulSendCoins modal', () => {
it('should render specific modal', () => { it('should render specific modal', () => {
expect(el.find(SuccessfulSendCoins).length).toBe(1) expect(el.find(SuccessfulSendCoins).length).toBe(1)
}) })
}); })
describe('SuccessfulSendPayment modal', () => {
const props = {
...defaultProps,
modalType: 'SUCCESSFUL_SEND_PAYMENT',
modalProps: {}
}
const el = shallow(<ModalRoot {...props} />)
it('should render specific modal', () => {
expect(el.find(SuccessfulSendPayment).length).toBe(1)
})
})

Loading…
Cancel
Save