import React, { createRef, PureComponent } from 'react'; import { Invitee } from 'app/types'; export interface Props { invitees: Invitee[]; revokeInvite: (code: string) => void; } export default class InviteesTable extends PureComponent { private copyUrlRef = createRef(); copyToClipboard = () => { const node = this.copyUrlRef.current; if (node) { node.select(); document.execCommand('copy'); } }; render() { const { invitees, revokeInvite } = this.props; return ( {invitees.map((invitee, index) => { return (
Email Name
{invitee.email} {invitee.name}