import { Col, H3, LoadingSpinner, Row, Text } from '@tlon/indigo-react'; import Modal from 'components/L2/Modal'; import { Button } from 'indigo-react'; import { InviteGeneratingStatus } from './useInvites'; interface GeneratingModalProps { status: InviteGeneratingStatus; current: number; total: number; error?: string; hide: () => void; } export const GeneratingModal = ({ status, current, total, hide, error, }: GeneratingModalProps) => { const successfulInvites = current > 1 ? current - 1 : 0; return ( {status === 'generating' && ( <>

Generating {current} of {total} Invites

Each invite will require four transactions to be signed, unless your point is owned by a master ticket. )} {status === 'finished' && ( <>

{total} Invites Generated

Your invites have been sent to the roller for confirmation in the next batch. Check the point's page to see its status. {/* // @ts-ignore */} )} {status === 'errored' && ( <>

There was an error while generating your invites:

{error && ( {error} )} {!!successfulInvites && ( At least {successfulInvites} invite {successfulInvites > 1 ? 's' : ''} were successfully generated. Go back to see them or try again. )} {/* // @ts-ignore */} )}
); };