From ac25871ba344713f961fbb4bbb75f8f5b447a9bb Mon Sep 17 00:00:00 2001 From: 9sneha-n <9sneha.n@gmail.com> Date: Tue, 4 Feb 2025 13:03:12 +0530 Subject: [PATCH] fix: do not redirect to homepae on error --- src/webapp/components/survey/SurveyForm.tsx | 5 ----- .../components/survey/hook/useTreatmentIndicationLink.ts | 1 - 2 files changed, 6 deletions(-) diff --git a/src/webapp/components/survey/SurveyForm.tsx b/src/webapp/components/survey/SurveyForm.tsx index 8b71000..745fd9b 100644 --- a/src/webapp/components/survey/SurveyForm.tsx +++ b/src/webapp/components/survey/SurveyForm.tsx @@ -87,11 +87,6 @@ export const SurveyForm: React.FC = props => { resetSaveActionOutcome(); setRefreshQuestionnaire({}); } - - //If error fetching survey, redirect to homepage. - if (error) { - // history.push(`/`); - } }, [ error, saveCompleteState, diff --git a/src/webapp/components/survey/hook/useTreatmentIndicationLink.ts b/src/webapp/components/survey/hook/useTreatmentIndicationLink.ts index 44eacff..7bce1e8 100644 --- a/src/webapp/components/survey/hook/useTreatmentIndicationLink.ts +++ b/src/webapp/components/survey/hook/useTreatmentIndicationLink.ts @@ -60,7 +60,6 @@ export const useTreatmentIndicationLink = ( setTreatmentOptions(prevTreatmeantOptions => { return prevTreatmeantOptions?.filter(option => option.code !== stageCode); }); - } else if (stageCode === PPS_PATIENT_TRACKER_INDICATION_STAGE_ID) { setIndicationOptions(prevIndicationOptions => { return prevIndicationOptions?.filter(option => option.code !== stageCode);