fix: survey switch (#2547)

This commit is contained in:
Anshuman Pandey
2024-04-27 02:03:07 +05:30
committed by GitHub
parent a6568ea539
commit f5236426ee

View File

@@ -165,9 +165,11 @@ export const SurveyMenuBar = ({
});
const segment = await handleSegmentUpdate();
await updateSurveyAction({ ...localSurvey, segment });
const updatedSurvey = await updateSurveyAction({ ...localSurvey, segment });
setIsSurveySaving(false);
setLocalSurvey(localSurvey);
setLocalSurvey(updatedSurvey);
toast.success("Changes saved.");
if (shouldNavigateBack) {
router.back();