Browse Source

feature(network): create network route and nav link

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
39a9f61d34
  1. 8
      app/components/Nav/Nav.js
  2. 2
      app/routes.js
  3. 18
      app/routes/network/components/Network.js
  4. 0
      app/routes/network/components/Network.scss
  5. 12
      app/routes/network/containers/NetworkContainer.js
  6. 3
      app/routes/network/index.js

8
app/components/Nav/Nav.js

@ -6,6 +6,7 @@ import Isvg from 'react-inlinesvg'
import walletIcon from 'icons/wallet.svg' import walletIcon from 'icons/wallet.svg'
import peersIcon from 'icons/peers.svg' import peersIcon from 'icons/peers.svg'
import channelsIcon from 'icons/channels.svg' import channelsIcon from 'icons/channels.svg'
import networkIcon from 'icons/globe.svg'
import styles from './Nav.scss' import styles from './Nav.scss'
@ -37,6 +38,13 @@ const Nav = ({ openPayForm, openRequestForm }) => (
<span>Channels</span> <span>Channels</span>
</li> </li>
</NavLink> </NavLink>
<NavLink exact to='/network' activeClassName={styles.active} className={styles.link}>
<span className={styles.activeBorder} />
<li>
<Isvg styles={{ verticalAlign: 'middle' }} src={networkIcon} />
<span>Network</span>
</li>
</NavLink>
</ul> </ul>
<div className={styles.buttons}> <div className={styles.buttons}>
<div className={`buttonPrimary ${styles.button}`} onClick={openPayForm}> <div className={`buttonPrimary ${styles.button}`} onClick={openPayForm}>

2
app/routes.js

@ -5,12 +5,14 @@ import App from './routes/app'
import Activity from './routes/activity' import Activity from './routes/activity'
import Peers from './routes/peers' import Peers from './routes/peers'
import Channels from './routes/channels' import Channels from './routes/channels'
import Network from './routes/network'
export default () => ( export default () => (
<App> <App>
<Switch> <Switch>
<Route path='/peers' component={Peers} /> <Route path='/peers' component={Peers} />
<Route path='/channels' component={Channels} /> <Route path='/channels' component={Channels} />
<Route path='/network' component={Network} />
<Route path='/' component={Activity} /> <Route path='/' component={Activity} />
</Switch> </Switch>
</App> </App>

18
app/routes/network/components/Network.js

@ -0,0 +1,18 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import styles from './Network.scss'
class Network extends Component {
render() {
return (
<div>
Network
</div>
)
}
}
Network.propTypes = {}
export default Network

0
app/routes/network/components/Network.scss

12
app/routes/network/containers/NetworkContainer.js

@ -0,0 +1,12 @@
import { withRouter } from 'react-router'
import { connect } from 'react-redux'
import Network from '../components/Network'
const mapDispatchToProps = {}
const mapStateToProps = state => ({
network: state.network
})
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Network))

3
app/routes/network/index.js

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