Jack Mallers
7 years ago
5 changed files with 0 additions and 182 deletions
@ -1,56 +0,0 @@ |
|||||
import React, { Component } from 'react' |
|
||||
import PropTypes from 'prop-types' |
|
||||
import Peers from 'components/Peers' |
|
||||
import styles from './Wallet.scss' |
|
||||
|
|
||||
class Wallet extends Component { |
|
||||
componentWillMount() { |
|
||||
const { fetchPeers } = this.props |
|
||||
|
|
||||
fetchPeers() |
|
||||
} |
|
||||
|
|
||||
render() { |
|
||||
const { |
|
||||
peers: { peersLoading, peers, peer, peerForm }, |
|
||||
fetchPeers, |
|
||||
setPeer, |
|
||||
peerModalOpen, |
|
||||
setPeerForm, |
|
||||
connectRequest, |
|
||||
disconnectRequest |
|
||||
} = this.props |
|
||||
|
|
||||
return ( |
|
||||
<div className={styles.wallet}> |
|
||||
<section className={styles.walletData}> |
|
||||
<Peers |
|
||||
fetchPeers={fetchPeers} |
|
||||
peersLoading={peersLoading} |
|
||||
peers={peers} |
|
||||
modalPeer={peer} |
|
||||
setPeer={setPeer} |
|
||||
peerModalOpen={peerModalOpen} |
|
||||
peerForm={peerForm} |
|
||||
setPeerForm={setPeerForm} |
|
||||
connect={connectRequest} |
|
||||
disconnect={disconnectRequest} |
|
||||
/> |
|
||||
</section> |
|
||||
</div> |
|
||||
) |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
Wallet.propTypes = { |
|
||||
fetchPeers: PropTypes.func.isRequired, |
|
||||
peers: PropTypes.object.isRequired, |
|
||||
setPeer: PropTypes.func.isRequired, |
|
||||
peerModalOpen: PropTypes.bool.isRequired, |
|
||||
setPeerForm: PropTypes.func.isRequired, |
|
||||
connectRequest: PropTypes.func.isRequired, |
|
||||
disconnectRequest: PropTypes.func.isRequired |
|
||||
} |
|
||||
|
|
||||
|
|
||||
export default Wallet |
|
@ -1,65 +0,0 @@ |
|||||
@import '../../../variables.scss'; |
|
||||
|
|
||||
.wallet { |
|
||||
background: $lightgrey; |
|
||||
} |
|
||||
|
|
||||
.header { |
|
||||
background: $white; |
|
||||
padding: 80px 30px; |
|
||||
border-bottom: 1px solid $darkgrey; |
|
||||
text-align: center; |
|
||||
|
|
||||
.walletInfo { |
|
||||
width: 75%; |
|
||||
margin: 0 auto; |
|
||||
} |
|
||||
|
|
||||
svg { |
|
||||
width: 100px; |
|
||||
height: 100px; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
h1 { |
|
||||
font-size: 20px; |
|
||||
margin: 20px 0; |
|
||||
font-weight: bold; |
|
||||
color: $black; |
|
||||
text-align: center; |
|
||||
} |
|
||||
|
|
||||
.address { |
|
||||
text-align: center; |
|
||||
margin-top: 10px; |
|
||||
|
|
||||
input[type=text] { |
|
||||
width: 50%; |
|
||||
text-align: center; |
|
||||
font-size: 14px; |
|
||||
font-weight: 200; |
|
||||
border-radius: 7px; |
|
||||
background: $lightgrey; |
|
||||
border: 1px solid $main; |
|
||||
padding: 10px; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
.walletData { |
|
||||
padding: 60px 40px; |
|
||||
|
|
||||
.peers { |
|
||||
width: 75%; |
|
||||
margin: 50px auto; |
|
||||
|
|
||||
h3 { |
|
||||
text-transform: uppercase; |
|
||||
color: $darkestgrey; |
|
||||
letter-spacing: 1.6px; |
|
||||
font-size: 14px; |
|
||||
font-weight: 400; |
|
||||
margin-bottom: 10px; |
|
||||
} |
|
||||
} |
|
||||
} |
|
@ -1,56 +0,0 @@ |
|||||
import { connect } from 'react-redux' |
|
||||
import { infoSelectors } from 'reducers/info' |
|
||||
import { newAddress } from 'reducers/address' |
|
||||
import { tickerSelectors } from 'reducers/ticker' |
|
||||
import { |
|
||||
fetchPeers, |
|
||||
setPeer, |
|
||||
peersSelectors, |
|
||||
setPeerForm, |
|
||||
connectRequest, |
|
||||
disconnectRequest |
|
||||
} from 'reducers/peers' |
|
||||
import { |
|
||||
fetchChannels, |
|
||||
setChannel, |
|
||||
channelsSelectors, |
|
||||
setChannelForm, |
|
||||
openChannel, |
|
||||
closeChannel |
|
||||
} from 'reducers/channels' |
|
||||
import Wallet from '../components/Wallet' |
|
||||
|
|
||||
const mapDispatchToProps = { |
|
||||
newAddress, |
|
||||
|
|
||||
fetchPeers, |
|
||||
setPeer, |
|
||||
connectRequest, |
|
||||
disconnectRequest, |
|
||||
|
|
||||
fetchChannels, |
|
||||
setChannel, |
|
||||
openChannel, |
|
||||
closeChannel, |
|
||||
|
|
||||
setPeerForm, |
|
||||
setChannelForm |
|
||||
} |
|
||||
|
|
||||
const mapStateToProps = state => ({ |
|
||||
info: state.info, |
|
||||
address: state.address, |
|
||||
ticker: state.ticker, |
|
||||
|
|
||||
peers: state.peers, |
|
||||
channels: state.channels, |
|
||||
|
|
||||
peerModalOpen: peersSelectors.peerModalOpen(state), |
|
||||
channelModalOpen: channelsSelectors.channelModalOpen(state), |
|
||||
|
|
||||
currentTicker: tickerSelectors.currentTicker(state), |
|
||||
|
|
||||
explorerLinkBase: infoSelectors.explorerLinkBase(state) |
|
||||
}) |
|
||||
|
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(Wallet) |
|
@ -1,3 +0,0 @@ |
|||||
import WalletContainer from './containers/WalletContainer' |
|
||||
|
|
||||
export default WalletContainer |
|
Loading…
Reference in new issue