Browse Source

fix(remove old route)

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
b9fa29ff09
  1. 2
      app/routes.js
  2. 56
      app/routes/wallet/components/Wallet.js
  3. 65
      app/routes/wallet/components/Wallet.scss
  4. 56
      app/routes/wallet/containers/WalletContainer.js
  5. 3
      app/routes/wallet/index.js

2
app/routes.js

@ -3,14 +3,12 @@ import React from 'react'
import { Switch, Route } from 'react-router'
import App from './routes/app'
import Activity from './routes/activity'
import Wallet from './routes/wallet'
import Peers from './routes/peers'
import Channels from './routes/channels'
export default () => (
<App>
<Switch>
<Route path='/wallet' component={Wallet} />
<Route path='/peers' component={Peers} />
<Route path='/channels' component={Channels} />
<Route path='/' component={Activity} />

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

@ -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

65
app/routes/wallet/components/Wallet.scss

@ -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;
}
}
}

56
app/routes/wallet/containers/WalletContainer.js

@ -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)

3
app/routes/wallet/index.js

@ -1,3 +0,0 @@
import WalletContainer from './containers/WalletContainer'
export default WalletContainer
Loading…
Cancel
Save