diff --git a/app/components/CryptoIcon/CryptoIcon.scss b/app/components/CryptoIcon/CryptoIcon.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/app/components/CurrencyIcon/CurrencyIcon.js b/app/components/CurrencyIcon/CurrencyIcon.js new file mode 100644 index 00000000..19840e18 --- /dev/null +++ b/app/components/CurrencyIcon/CurrencyIcon.js @@ -0,0 +1,16 @@ +import React from 'react' +import PropTypes from 'prop-types' +import { FaDollar } from 'react-icons/lib/fa' +import CryptoIcon from '../CryptoIcon' + +const CurrencyIcon = ({ currency, crypto }) => (currency === 'usd' ? + + : + ) + +CurrencyIcon.propTypes = { + currency: PropTypes.string.isRequired, + crypto: PropTypes.string.isRequired +} + +export default CurrencyIcon diff --git a/app/components/CurrencyIcon/index.js b/app/components/CurrencyIcon/index.js new file mode 100644 index 00000000..da33382d --- /dev/null +++ b/app/components/CurrencyIcon/index.js @@ -0,0 +1,3 @@ +import CurrencyIcon from './CurrencyIcon' + +export default CurrencyIcon diff --git a/app/routes/app/components/components/Form/Form.js b/app/routes/app/components/components/Form/Form.js index 52396a2d..a286f67d 100644 --- a/app/routes/app/components/components/Form/Form.js +++ b/app/routes/app/components/components/Form/Form.js @@ -1,8 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' -import { FaDollar } from 'react-icons/lib/fa' import { MdClose } from 'react-icons/lib/md' -import CryptoIcon from '../../../../../components/CryptoIcon' +import CurrencyIcon from '../../../../../components/CurrencyIcon' import { btc } from '../../../../../utils' import styles from './Form.scss' @@ -46,12 +45,7 @@ const Form = ({
(
  • - {ticker.currency === 'usd' ? : } + { ticker.currency === 'usd' ? @@ -39,7 +40,7 @@ const Nav = ({ ticker, balance, setCurrency, formClicked, currentTicker }) => (

    - {ticker.currency === 'usd' ? : } + { ticker.currency === 'usd' ?