From a62df049a701e934319ce9fcfa1e89553b3ff4b5 Mon Sep 17 00:00:00 2001 From: Ryczko Date: Sat, 11 May 2024 15:49:45 +0200 Subject: [PATCH] Fix/double send notifications --- .../features/SurveyDisplay/managers/surveyAnswerManager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/features/surveys/features/SurveyDisplay/managers/surveyAnswerManager.ts b/src/features/surveys/features/SurveyDisplay/managers/surveyAnswerManager.ts index 73da495..3fed00b 100644 --- a/src/features/surveys/features/SurveyDisplay/managers/surveyAnswerManager.ts +++ b/src/features/surveys/features/SurveyDisplay/managers/surveyAnswerManager.ts @@ -138,7 +138,8 @@ export const useSurveyAnswerManager = ( if ( !process.env.NEXT_PUBLIC_ALLOW_MULTIPLE_ANSWERS && localStorageValue.includes(surveyId) && - !isAnswering + !isAnswering && + !isSurveyFinished ) { router.replace('/'); toast.success(t('alreadyAnswered'));