import React from 'react'; import type { IncomingCollectionInvite } from '../../store/collectionStore'; import type { TranslationFn } from '../../types'; interface CollectionInviteCardProps { invite: IncomingCollectionInvite; onAccept: (id: number) => void | Promise; onDecline: (id: number) => void | Promise; t: TranslationFn; } /** * One pending list invite with Accept / Decline. Lives in the lists rail, and in * the page body where the rail is not on screen: no lists of one's own yet, or * the invite notification's link to a list that is still an invite (#2645). */ export default function CollectionInviteCard({ invite, onAccept, onDecline, t, }: CollectionInviteCardProps): React.ReactElement { return (
{invite.name}
{t('collections.invites.from')} {invite.from.username}
); }