Browse Source

fix(questions-list): close overlay and return to waiting screen when clicking submit in edit profile mode

master
mortezaei 2 weeks ago
parent
commit
b0ee500664
  1. 8
      src/app/questions-list/questions-list-client.tsx

8
src/app/questions-list/questions-list-client.tsx

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

Loading…
Cancel
Save