Browse Source

Merge pull request #462 from mrfelton/perf/react-icon-includes

Optimise bundle size by only importing used react icons
renovate/lint-staged-8.x
Ben Woosley 7 years ago
committed by GitHub
parent
commit
86309b1925
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/components/Activity/InvoiceModal.js
  2. 2
      app/components/Activity/PaymentModal.js
  3. 2
      app/components/Activity/TransactionModal.js
  4. 4
      app/components/Contacts/ContactModal.js
  5. 5
      app/components/Contacts/ContactsForm.js
  6. 5
      app/components/Contacts/Network.js
  7. 2
      app/components/Contacts/SubmitChannelForm.js
  8. 2
      app/components/CurrencyIcon/CurrencyIcon.js
  9. 2
      app/components/Form/Pay.js
  10. 2
      app/components/Form/Request.js
  11. 2
      app/components/GlobalError/GlobalError.js
  12. 3
      app/components/Onboarding/Autopilot.js
  13. 3
      app/components/Onboarding/ConnectionType.js
  14. 3
      app/components/Onboarding/FormContainer.js
  15. 3
      app/components/Onboarding/Signup.js
  16. 2
      app/components/Wallet/Wallet.js
  17. 2
      test/components/CurrencyIcon.spec.js

2
app/components/Activity/InvoiceModal.js

@ -8,7 +8,7 @@ import QRCode from 'qrcode.react'
import copy from 'copy-to-clipboard'
import { showNotification } from 'notifications'
import { FaAngleDown } from 'react-icons/lib/fa'
import FaAngleDown from 'react-icons/lib/fa/angle-down'
import Value from 'components/Value'
import Countdown from './Countdown'

2
app/components/Activity/PaymentModal.js

@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import Moment from 'react-moment'
import 'moment-timezone'
import { FaAngleDown } from 'react-icons/lib/fa'
import FaAngleDown from 'react-icons/lib/fa/angle-down'
import Isvg from 'react-inlinesvg'
import paperPlane from 'icons/paper_plane.svg'

2
app/components/Activity/TransactionModal.js

@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import Moment from 'react-moment'
import 'moment-timezone'
import { FaAngleDown } from 'react-icons/lib/fa'
import FaAngleDown from 'react-icons/lib/fa/angle-down'
import Isvg from 'react-inlinesvg'
import paperPlane from 'icons/paper_plane.svg'

4
app/components/Contacts/ContactModal.js

@ -2,8 +2,8 @@ import React from 'react'
import PropTypes from 'prop-types'
import find from 'lodash/find'
import ReactModal from 'react-modal'
import { FaCircle } from 'react-icons/lib/fa'
import { MdClose } from 'react-icons/lib/md'
import FaCircle from 'react-icons/lib/fa/circle'
import MdClose from 'react-icons/lib/md/close'
import { btc } from 'utils'

5
app/components/Contacts/ContactsForm.js

@ -1,8 +1,9 @@
import React from 'react'
import PropTypes from 'prop-types'
import ReactModal from 'react-modal'
import { MdClose } from 'react-icons/lib/md'
import { FaCircle, FaQuestionCircle } from 'react-icons/lib/fa'
import MdClose from 'react-icons/lib/md/close'
import FaCircle from 'react-icons/lib/fa/circle'
import FaQuestionCircle from 'react-icons/lib/fa/question-circle'
import styles from './ContactsForm.scss'
class ContactsForm extends React.Component {

5
app/components/Contacts/Network.js

@ -2,7 +2,10 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import find from 'lodash/find'
import Isvg from 'react-inlinesvg'
import { FaExternalLink, FaCircle, FaRepeat, FaAngleDown } from 'react-icons/lib/fa'
import FaExternalLink from 'react-icons/lib/fa/external-link'
import FaCircle from 'react-icons/lib/fa/circle'
import FaRepeat from 'react-icons/lib/fa/repeat'
import FaAngleDown from 'react-icons/lib/fa/angle-down'
import { btc, blockExplorer } from 'utils'
import plus from 'icons/plus.svg'
import search from 'icons/search.svg'

2
app/components/Contacts/SubmitChannelForm.js

@ -1,7 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import { FaAngleDown } from 'react-icons/lib/fa'
import FaAngleDown from 'react-icons/lib/fa/angle-down'
import styles from './SubmitChannelForm.scss'

2
app/components/CurrencyIcon/CurrencyIcon.js

@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { FaDollar } from 'react-icons/lib/fa'
import FaDollar from 'react-icons/lib/fa/dollar'
import CryptoIcon from '../CryptoIcon'
const CurrencyIcon = ({ currency, crypto, styles }) => {

2
app/components/Form/Pay.js

@ -5,7 +5,7 @@ import find from 'lodash/find'
import Isvg from 'react-inlinesvg'
import paperPlane from 'icons/paper_plane.svg'
import link from 'icons/link.svg'
import { FaAngleDown } from 'react-icons/lib/fa'
import FaAngleDown from 'react-icons/lib/fa/angle-down'
import { btc } from 'utils'

2
app/components/Form/Request.js

@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import Isvg from 'react-inlinesvg'
import hand from 'icons/hand.svg'
import { FaAngleDown } from 'react-icons/lib/fa'
import FaAngleDown from 'react-icons/lib/fa/angle-down'
import { btc } from 'utils'
import styles from './Request.scss'

2
app/components/GlobalError/GlobalError.js

@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { MdClose } from 'react-icons/lib/md'
import MdClose from 'react-icons/lib/md/close'
import styles from './GlobalError.scss'
class GlobalError extends React.Component {

3
app/components/Onboarding/Autopilot.js

@ -1,6 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import { FaCircle, FaCircleThin } from 'react-icons/lib/fa'
import FaCircle from 'react-icons/lib/fa/circle'
import FaCircleThin from 'react-icons/lib/fa/circle-thin'
import styles from './Autopilot.scss'
const Autopilot = ({ autopilot, setAutopilot }) => (

3
app/components/Onboarding/ConnectionType.js

@ -1,6 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import { FaCircle, FaCircleThin } from 'react-icons/lib/fa'
import FaCircle from 'react-icons/lib/fa/circle'
import FaCircleThin from 'react-icons/lib/fa/circle-thin'
import styles from './ConnectionType.scss'
const ConnectionType = ({ connectionType, setConnectionType }) => (

3
app/components/Onboarding/FormContainer.js

@ -2,7 +2,8 @@ import React from 'react'
import PropTypes from 'prop-types'
import Isvg from 'react-inlinesvg'
import { FaAngleLeft, FaAngleRight } from 'react-icons/lib/fa'
import FaAngleLeft from 'react-icons/lib/fa/angle-left'
import FaAngleRight from 'react-icons/lib/fa/angle-right'
import zapLogo from 'icons/zap_logo.svg'
import styles from './FormContainer.scss'

3
app/components/Onboarding/Signup.js

@ -1,6 +1,7 @@
import React from 'react'
import PropTypes from 'prop-types'
import { FaCircle, FaCircleThin } from 'react-icons/lib/fa'
import FaCircle from 'react-icons/lib/fa/circle'
import FaCircleThin from 'react-icons/lib/fa/circle-thin'
import styles from './Signup.scss'
const Signup = ({ signupForm, setSignupCreate, setSignupImport }) => (

2
app/components/Wallet/Wallet.js

@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import { FaAngleDown } from 'react-icons/lib/fa'
import FaAngleDown from 'react-icons/lib/fa/angle-down'
import Isvg from 'react-inlinesvg'
import { btc, blockExplorer } from 'utils'

2
test/components/CurrencyIcon.spec.js

@ -1,6 +1,6 @@
import React from 'react'
import { shallow } from 'enzyme'
import { FaDollar } from 'react-icons/lib/fa'
import FaDollar from 'react-icons/lib/fa/dollar'
import CryptoIcon from '../../app/components/CryptoIcon'
import CurrencyIcon from '../../app/components/CurrencyIcon'

Loading…
Cancel
Save