import React from 'react' import PropTypes from 'prop-types' import ReactModal from 'react-modal' import { MdClose } from 'react-icons/lib/md' import styles from './PeerModal.scss' const PeerModal = ({ isOpen, resetPeer, peer, disconnect }) => { const customStyles = { overlay: { cursor: 'pointer', overflowY: 'auto' }, content: { top: 'auto', left: '20%', right: '0', bottom: 'auto', width: '40%', margin: '50px auto', borderRadius: 'none', padding: '0' } } return ( resetPeer(null)} parentSelector={() => document.body} style={customStyles} >
resetPeer(null)}>
{ peer &&

{peer.address}

{peer.pub_key}

Satoshis Received
{peer.sat_recv}
Satoshis Sent
{peer.sat_sent}
Bytes Received
{peer.bytes_recv}
Bytes Sent
{peer.bytes_sent}
disconnect({ pubkey: peer.pub_key })}>
Disconnect peer
}
) } PeerModal.propTypes = { isOpen: PropTypes.bool.isRequired, resetPeer: PropTypes.func.isRequired, peer: PropTypes.object, disconnect: PropTypes.func.isRequired } export default PeerModal