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 PropTypes from 'prop-types'
import AnimatedCheckmark from 'components/AnimatedCheckmark'
import { btc } from 'utils'
import styles from './SuccessfulSendPayment.scss'
const SuccessfulSendPayment = ({ hideModal }) => {
return (
<div className={styles.container}>
<AnimatedCheckmark />
<h1>
<span>Successfully sent payment</span>&nbsp;
</h1>
<div className={styles.button} onClick={hideModal}>
const SuccessfulSendPayment = ({ hideModal }) => (
<div className={styles.container}>
<AnimatedCheckmark />
<h1>
<span>Successfully sent payment</span>&nbsp;
</h1>
<div className={styles.button} onClick={hideModal}>
Done
</div>
</div>
)
}
</div>
)
SuccessfulSendPayment.propTypes = {
hideModal: PropTypes.func.isRequired

2
app/reducers/ipc.js

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

15
test/components/ModalRoot.spec.js

@ -2,6 +2,7 @@ import React from 'react'
import { shallow } from 'enzyme'
import ModalRoot from '../../app/components/ModalRoot'
import SuccessfulSendCoins from '../../app/components/ModalRoot/SuccessfulSendCoins'
import SuccessfulSendPayment from '../../app/components/ModalRoot/SuccessfulSendPayment'
const defaultProps = {
hideModal: () => {},
@ -32,4 +33,16 @@ describe('SuccessfulSendCoins modal', () => {
it('should render specific modal', () => {
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