import React, { Component } from 'react' import PropTypes from 'prop-types' import { InteractiveForceGraph, ForceGraphNode, ForceGraphLink } from 'react-vis-force' import NetworkGraph from 'components/Network/NetworkGraph' import PeersList from 'components/Network/PeersList' import styles from './Network.scss' class Network extends Component { componentWillMount() { const { fetchDescribeNetwork, fetchPeers } = this.props fetchPeers() fetchDescribeNetwork() } render() { const { setCurrentTab, updateSelectedPeers, network, selectedPeerPubkeys, peers: { peers }, identity_pubkey } = this.props const renderContent = () => { switch(network.currentTab) { case 1: return break case 2: return

channels

break case 3: return

transactions

break } } return (
  • setCurrentTab(1)} > Peers
  • setCurrentTab(2)} > Channels
  • setCurrentTab(3)} > Transactions
{renderContent()}
) } } Network.propTypes = { fetchDescribeNetwork: PropTypes.func.isRequired, fetchPeers: PropTypes.func.isRequired, setCurrentTab: PropTypes.func.isRequired, network: PropTypes.object.isRequired, peers: PropTypes.object.isRequired, identity_pubkey: PropTypes.string.isRequired } export default Network