|
|
@ -164,7 +164,11 @@ export default function QuestionsListClient({ |
|
|
const startMatchMutation = useStartMarriageMatchMutation({ |
|
|
const startMatchMutation = useStartMarriageMatchMutation({ |
|
|
onSuccess: () => { |
|
|
onSuccess: () => { |
|
|
markMatchStarted(); |
|
|
markMatchStarted(); |
|
|
router.replace(localizePath("/finding-match", locale)); |
|
|
|
|
|
|
|
|
if (onClose) { |
|
|
|
|
|
onClose(); |
|
|
|
|
|
} else { |
|
|
|
|
|
router.replace(localizePath("/finding-match", locale)); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
onError: () => { |
|
|
onError: () => { |
|
|
// Never pretend the request went through – the user stays here and can
|
|
|
// Never pretend the request went through – the user stays here and can
|
|
|
@ -674,6 +678,10 @@ export default function QuestionsListClient({ |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
await syncPendingAnswers(); |
|
|
await syncPendingAnswers(); |
|
|
|
|
|
if (onClose) { |
|
|
|
|
|
onClose(); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
startMatchMutation.mutate(); |
|
|
startMatchMutation.mutate(); |
|
|
} catch (err) { |
|
|
} catch (err) { |
|
|
console.error("Failed to sync pending sections:", err); |
|
|
console.error("Failed to sync pending sections:", err); |
|
|
|