fix: confirm modal on back button (#2189)

This commit is contained in:
Dhruwang Jariwala
2024-03-06 13:12:32 +05:30
committed by GitHub
parent b9e5a6f9b9
commit f20a0d2ff7
@@ -54,8 +54,6 @@ export default function SurveyEditor({
useEffect(() => {
if (survey) {
if (localSurvey) return;
const surveyClone = structuredClone(survey);
setLocalSurvey(surveyClone);
@@ -63,7 +61,7 @@ export default function SurveyEditor({
setActiveQuestionId(survey.questions[0].id);
}
}
}, [localSurvey, survey]);
}, [survey]);
useEffect(() => {
const listener = () => {