import React, { createRef, PureComponent } from 'react'; import { connect } from 'react-redux'; import { Invitee } from 'app/types'; import { revokeInvite } from './state/actions'; export interface Props { invitee: Invitee; revokeInvite: typeof revokeInvite; } class InviteeRow extends PureComponent { private copyUrlRef = createRef(); copyToClipboard = () => { const node = this.copyUrlRef.current; if (node) { node.select(); document.execCommand('copy'); } }; render() { const { invitee, revokeInvite } = this.props; return ( {invitee.email} {invitee.name}