The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.
TypeScript budget-trackercollaborativedockeritinerarymcp-serveroffline-firstopen-sourceopenstreetmappacking-listpwareal-timeself-hostedselfhostedtraveltravel-apptravel-journaltravel-plannertripitwanderlog
refactor(collections): the invite cards take the async accept and decline as they are
Maurice97833412dcd0
diff --git a/client/src/components/Collections/CollectionInviteCard.tsx b/client/src/components/Collections/CollectionInviteCard.tsxindex 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<void>;+ onDecline: (id: number) => void | Promise<void>;t: TranslationFn;}@@ -27,10 +27,10 @@ export default function CollectionInviteCard({{t('collections.invites.from')} {invite.from.username}</div><div className="col-invite-actions">- <button type="button" onClick={() => onAccept(invite.collection_id)} className="col-invite-accept">+ <button type="button" onClick={() => void onAccept(invite.collection_id)} className="col-invite-accept">{t('collections.invites.accept')}</button>- <button type="button" onClick={() => onDecline(invite.collection_id)} className="col-invite-decline">+ <button type="button" onClick={() => void onDecline(invite.collection_id)} className="col-invite-decline">{t('collections.invites.decline')}</button></div>diff --git a/client/src/mobile/screens/collections/MCollInvites.tsx b/client/src/mobile/screens/collections/MCollInvites.tsxindex 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<void>;+ onDecline: (id: number) => void | Promise<void>;t: TranslationFn;}@@ -30,10 +30,12 @@ export default function MCollInvites({ invites, onAccept, onDecline, t }: MCollI{t('collections.invites.from')} {inv.from.username}</div><div className="mt-3 flex items-center gap-2">- <PrimaryPill onClick={() => onAccept(inv.collection_id)}>+ <PrimaryPill onClick={() => void onAccept(inv.collection_id)}><Check size={14} strokeWidth={2.4} /> {t('collections.invites.accept')}</PrimaryPill>- <CancelPill onClick={() => onDecline(inv.collection_id)}>{t('collections.invites.decline')}</CancelPill>+ <CancelPill onClick={() => void onDecline(inv.collection_id)}>+ {t('collections.invites.decline')}+ </CancelPill></div></div>))}