import React from 'react' import PropTypes from 'prop-types' import ReactModal from 'react-modal' import copy from 'copy-to-clipboard' import QRCode from 'qrcode.react' import { showNotification } from 'notifications' import styles from './ReceiveModal.scss' const ReceiveModal = ({ isOpen, hideActivityModal, pubkey, address }) => { const customStyles = { overlay: { cursor: 'pointer' }, content: { top: 'auto', left: '20%', right: '0', bottom: 'auto', width: '40%', margin: '50px auto' } } const copyOnClick = (data) => { copy(data) showNotification('Noice', 'Successfully copied to clipboard') } return ( hideActivityModal()} parentSelector={() => document.body} style={customStyles} >

Node Public Key ( copyOnClick(pubkey)}>Copy)

{pubkey}

Deposit Address ( copyOnClick(address)}>Copy)

{address}

) } ReceiveModal.propTypes = { isOpen: PropTypes.bool.isRequired, hideActivityModal: PropTypes.func.isRequired, pubkey: PropTypes.string.isRequired, address: PropTypes.string.isRequired } export default ReceiveModal