Browse Source

fix(lint): fix linting errors

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
18f6aa6f96
  1. 11
      app/components/Nav/Nav.js
  2. 7
      app/components/Wallet/ReceiveModal.js
  3. 19
      app/components/Wallet/Wallet.js
  4. 13
      app/routes/app/components/App.js
  5. 9
      app/routes/wallet/components/Wallet.js

11
app/components/Nav/Nav.js

@ -3,13 +3,10 @@ import PropTypes from 'prop-types'
import { NavLink } from 'react-router-dom'
import ReactSVG from 'react-svg'
import { MdAccountBalanceWallet } from 'react-icons/lib/md'
import { FaClockO, FaDollar } from 'react-icons/lib/fa'
import CryptoIcon from 'components/CryptoIcon'
import CurrencyIcon from 'components/CurrencyIcon'
import { btc, usd } from 'utils'
import { FaClockO } from 'react-icons/lib/fa'
import styles from './Nav.scss'
const Nav = ({ ticker, balance, setCurrency, currentTicker, openPayForm, openRequestForm }) => (
const Nav = ({ openPayForm, openRequestForm }) => (
<nav className={styles.nav}>
<div className={styles.logo}>
<ReactSVG path='../resources/zap_2.svg' />
@ -40,10 +37,6 @@ const Nav = ({ ticker, balance, setCurrency, currentTicker, openPayForm, openReq
)
Nav.propTypes = {
ticker: PropTypes.object.isRequired,
balance: PropTypes.object.isRequired,
setCurrency: PropTypes.func.isRequired,
currentTicker: PropTypes.object.isRequired,
openPayForm: PropTypes.func.isRequired,
openRequestForm: PropTypes.func.isRequired
}

7
app/components/Wallet/ReceiveModal.js

@ -28,7 +28,7 @@ const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address }) => {
return (
<ReactModal
isOpen
isOpen={isOpen}
ariaHideApp
shouldCloseOnOverlayClick
contentLabel='No Overlay Click Modal'
@ -55,7 +55,10 @@ const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address }) => {
}
ReceiveModal.propTypes = {
isOpen: PropTypes.bool.isRequired,
hideActivityModal: PropTypes.func.isRequired,
pubkey: PropTypes.string.isRequired,
address: PropTypes.string.isRequired
}
export default ReceiveModal

19
app/components/Wallet/Wallet.js

@ -2,7 +2,7 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { FaQrcode } from 'react-icons/lib/fa'
import CryptoIcon from 'components/CryptoIcon'
import { btc, usd } from 'utils'
import { btc } from 'utils'
import ReceiveModal from './ReceiveModal'
import styles from './Wallet.scss'
@ -18,11 +18,9 @@ class Wallet extends Component {
render() {
const {
ticker,
currentTicker,
balance,
address,
info,
showModal
info
} = this.props
const { modalOpen } = this.state
@ -62,23 +60,12 @@ class Wallet extends Component {
)
}
}
// const Wallet = ({ ticker, currentTicker, balance, address, info, showModal }) => {
// const copyOnClick = data => {
// copy(data)
// showNotification('Noice', 'Successfully copied to clipboard')
// }
// return (
// )
// }
Wallet.propTypes = {
ticker: PropTypes.object.isRequired,
currentTicker: PropTypes.object.isRequired,
balance: PropTypes.object.isRequired,
address: PropTypes.string.isRequired,
info: PropTypes.object.isRequired,
showModal: PropTypes.func.isRequired
info: PropTypes.object.isRequired
}
export default Wallet

13
app/routes/app/components/App.js

@ -27,15 +27,13 @@ class App extends Component {
fetchBlockHeight,
modal: { modalType, modalProps },
showModal,
hideModal,
ticker,
currentTicker,
address: { address },
balance,
info,
form,
setCurrency,
currentTicker,
openPayForm,
openRequestForm,
@ -70,10 +68,6 @@ class App extends Component {
<Form formType={form.formType} formProps={formProps} closeForm={closeForm} />
<Nav
ticker={ticker}
balance={balance}
setCurrency={setCurrency}
currentTicker={currentTicker}
openPayForm={openPayForm}
openRequestForm={openRequestForm}
/>
@ -81,11 +75,9 @@ class App extends Component {
<div className={styles.content}>
<Wallet
ticker={ticker}
currentTicker={currentTicker}
balance={balance}
address={address}
info={info}
showModal={showModal}
/>
{children}
</div>
@ -104,15 +96,16 @@ App.propTypes = {
ticker: PropTypes.object.isRequired,
address: PropTypes.object.isRequired,
balance: PropTypes.object.isRequired,
info: PropTypes.object.isRequired,
form: PropTypes.object.isRequired,
formProps: PropTypes.object.isRequired,
closeForm: PropTypes.func.isRequired,
newAddress: PropTypes.func.isRequired,
fetchInfo: PropTypes.func.isRequired,
hideModal: PropTypes.func.isRequired,
fetchTicker: PropTypes.func.isRequired,
fetchBalance: PropTypes.func.isRequired,
setCurrency: PropTypes.func.isRequired,
openPayForm: PropTypes.func.isRequired,
openRequestForm: PropTypes.func.isRequired,

9
app/routes/wallet/components/Wallet.js

@ -1,23 +1,19 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ReactSVG from 'react-svg'
import Channels from 'components/Channels'
import Peers from 'components/Peers'
import styles from './Wallet.scss'
class Wallet extends Component {
componentWillMount() {
const { fetchPeers, fetchChannels, newAddress } = this.props
const { fetchPeers, fetchChannels } = this.props
fetchPeers()
fetchChannels()
newAddress('p2pkh')
}
render() {
const {
info,
address: { address },
ticker,
peers: { peersLoading, peers, peer, peerForm },
channels: { channelsLoading, channels, channel, channelForm, pendingChannels },
@ -80,7 +76,6 @@ class Wallet extends Component {
Wallet.propTypes = {
fetchPeers: PropTypes.func.isRequired,
fetchChannels: PropTypes.func.isRequired,
info: PropTypes.object.isRequired,
ticker: PropTypes.object.isRequired,
peers: PropTypes.object.isRequired,
channels: PropTypes.object.isRequired,
@ -95,8 +90,6 @@ Wallet.propTypes = {
allChannels: PropTypes.array.isRequired,
openChannel: PropTypes.func.isRequired,
closeChannel: PropTypes.func.isRequired,
newAddress: PropTypes.func.isRequired,
address: PropTypes.object.isRequired,
currentTicker: PropTypes.object.isRequired,
explorerLinkBase: PropTypes.string.isRequired
}

Loading…
Cancel
Save