import React from 'react' import PropTypes from 'prop-types' import ReactModal from 'react-modal' 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', padding: '40px' } } return ( resetPeer(null)} parentSelector={() => document.body} style={customStyles} > { 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
: null }
) } PeerModal.propTypes = { isOpen: PropTypes.bool.isRequired, resetPeer: PropTypes.func.isRequired, peer: PropTypes.object, disconnect: PropTypes.func.isRequired } export default PeerModal