From 97833412dcd00f2e7ae5c3b650a89263430cab6c Mon Sep 17 00:00:00 2001 From: Maurice Date: Mon, 12 Oct 2026 19:57:48 +0000 Subject: [PATCH] refactor(collections): the invite cards take the async accept and decline as they are --- .../components/Collections/CollectionInviteCard.tsx | 8 ++++---- client/src/mobile/screens/collections/MCollInvites.tsx | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/client/src/components/Collections/CollectionInviteCard.tsx b/client/src/components/Collections/CollectionInviteCard.tsx index 84eeee74c..44781ce69 100644 --- a/client/src/components/Collections/CollectionInviteCard.tsx +++ b/client/src/components/Collections/CollectionInviteCard.tsx @@ -4,8 +4,8 @@ import type { TranslationFn } from '../../types'; interface CollectionInviteCardProps { invite: IncomingCollectionInvite; - onAccept: (id: number) => void; - onDecline: (id: number) => void; + onAccept: (id: number) => void | Promise; + onDecline: (id: number) => void | Promise; t: TranslationFn; } @@ -27,10 +27,10 @@ export default function CollectionInviteCard({ {t('collections.invites.from')} {invite.from.username}
- -
diff --git a/client/src/mobile/screens/collections/MCollInvites.tsx b/client/src/mobile/screens/collections/MCollInvites.tsx index 232791cd6..0509a2452 100644 --- a/client/src/mobile/screens/collections/MCollInvites.tsx +++ b/client/src/mobile/screens/collections/MCollInvites.tsx @@ -5,8 +5,8 @@ import { CancelPill, Eyebrow, PrimaryPill } from './MCollSheetKit'; interface MCollInvitesProps { invites: IncomingCollectionInvite[]; - onAccept: (id: number) => void; - onDecline: (id: number) => void; + onAccept: (id: number) => void | Promise; + onDecline: (id: number) => void | Promise; t: TranslationFn; } @@ -30,10 +30,12 @@ export default function MCollInvites({ invites, onAccept, onDecline, t }: MCollI {t('collections.invites.from')} {inv.from.username}
- onAccept(inv.collection_id)}> + void onAccept(inv.collection_id)}> {t('collections.invites.accept')} - onDecline(inv.collection_id)}>{t('collections.invites.decline')} + void onDecline(inv.collection_id)}> + {t('collections.invites.decline')} +
))}