Browse Source

fix(lint): fix linting errors

renovate/lint-staged-8.x
Jack Mallers 8 years ago
parent
commit
e16d0cd906
  1. 10
      app/components/CurrencyIcon/CurrencyIcon.js
  2. 2
      app/components/CurrencyIcon/index.js
  3. 4
      app/routes/app/components/components/Form/Form.js

10
app/components/CurrencyIcon/CurrencyIcon.js

@ -3,12 +3,10 @@ import PropTypes from 'prop-types'
import { FaDollar } from 'react-icons/lib/fa' import { FaDollar } from 'react-icons/lib/fa'
import CryptoIcon from '../CryptoIcon' import CryptoIcon from '../CryptoIcon'
const CurrencyIcon = ({ currency, crypto }) => { const CurrencyIcon = ({ currency, crypto }) => (currency === 'usd' ?
return currency === 'usd' ? <FaDollar />
<FaDollar /> :
: <CryptoIcon currency={crypto} />)
<CryptoIcon currency={crypto} />
}
CurrencyIcon.propTypes = { CurrencyIcon.propTypes = {
currency: PropTypes.string.isRequired, currency: PropTypes.string.isRequired,

2
app/components/CurrencyIcon/index.js

@ -1,3 +1,3 @@
import CurrencyIcon from './CurrencyIcon' import CurrencyIcon from './CurrencyIcon'
export default CurrencyIcon export default CurrencyIcon

4
app/routes/app/components/components/Form/Form.js

@ -1,8 +1,6 @@
import React from 'react' import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { FaDollar } from 'react-icons/lib/fa'
import { MdClose } from 'react-icons/lib/md' import { MdClose } from 'react-icons/lib/md'
import CryptoIcon from '../../../../../components/CryptoIcon'
import CurrencyIcon from '../../../../../components/CurrencyIcon' import CurrencyIcon from '../../../../../components/CurrencyIcon'
import { btc } from '../../../../../utils' import { btc } from '../../../../../utils'
import styles from './Form.scss' import styles from './Form.scss'
@ -37,7 +35,7 @@ const Form = ({
} }
const calculateAmount = value => (currency === 'btc' ? btc.satoshisToBtc(value) : btc.satoshisToUsd(value, currentTicker.price_usd)) const calculateAmount = value => (currency === 'btc' ? btc.satoshisToBtc(value) : btc.satoshisToUsd(value, currentTicker.price_usd))
return ( return (
<div className={`${styles.formContainer} ${isOpen ? styles.open : ''}`}> <div className={`${styles.formContainer} ${isOpen ? styles.open : ''}`}>
<div className={styles.container}> <div className={styles.container}>

Loading…
Cancel
Save