From 1c4ec2b412705bba41908141df0d942246e97153 Mon Sep 17 00:00:00 2001 From: jjbrunton Date: Sun, 6 Sep 2026 12:39:38 +0100 Subject: [PATCH] fix(mobile): resolve pairing payoff route types --- apps/mobile/app/(app)/pairing.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/mobile/app/(app)/pairing.tsx b/apps/mobile/app/(app)/pairing.tsx index fecde7e..de58712 100755 --- a/apps/mobile/app/(app)/pairing.tsx +++ b/apps/mobile/app/(app)/pairing.tsx @@ -41,6 +41,7 @@ export default function PairingScreen() { const [prefillAttempted, setPrefillAttempted] = useState(false); const [joinError, setJoinError] = useState(null); const [isPollOffline, setIsPollOffline] = useState(false); + const [isIncomingConflictDismissed, setIsIncomingConflictDismissed] = useState(false); // Redirect if already paired. Pairing claims both members' sealed answers and // computes matches server-side, so the matches store must refetch here too: @@ -59,7 +60,7 @@ export default function PairingScreen() { } const seen = await hasSeenPairedUnlock(user.id, couple.id); if (!cancelled) { - router.replace(seen ? "/(app)" : "/(app)/paired"); + router.replace(seen ? "/(app)" : "/(app)/paired" as any); } })(); return () => { cancelled = true; }; @@ -173,7 +174,7 @@ export default function PairingScreen() { await useMatchStore.getState().fetchMatches(true); Events.coupleJoined(); - router.replace("/(app)/paired"); + router.replace("/(app)/paired" as any); } catch (error: any) { const details = error instanceof ApiError ? error.details as { error?: { code?: string } } : undefined; const code = details?.error?.code; @@ -336,14 +337,14 @@ export default function PairingScreen() { - {incomingCode && ( + {incomingCode && !isIncomingConflictDismissed && ( Use this code instead? You have your own invite out. To join theirs, cancel yours first. Your code will stop working, and answers you've given since you created it will be deleted. Cancel mine and join - void clearPendingInviteCode()} style={styles.cancelButton} testID="pairing-conflict-keep-own"> + { setIsIncomingConflictDismissed(true); void clearPendingInviteCode(); }} style={styles.cancelButton} testID="pairing-conflict-keep-own"> Keep my invite