diff --git a/frontend/src/features/public-form/components/FormEndPage/components/EndPageBlock.tsx b/frontend/src/features/public-form/components/FormEndPage/components/EndPageBlock.tsx index 007056c733..ae9a09d0df 100644 --- a/frontend/src/features/public-form/components/FormEndPage/components/EndPageBlock.tsx +++ b/frontend/src/features/public-form/components/FormEndPage/components/EndPageBlock.tsx @@ -8,7 +8,10 @@ import { useMdComponents } from '~hooks/useMdComponents' import Button from '~components/Button' import { MarkdownText } from '~components/MarkdownText' -import { SubmissionData } from '~features/public-form/PublicFormContext' +import { + SubmissionData, + usePublicFormContext, +} from '~features/public-form/PublicFormContext' export interface EndPageBlockProps { formTitle: FormDto['title'] | undefined @@ -53,6 +56,9 @@ export const EndPageBlock = ({ return 'You have successfully submitted your response.' }, [formTitle]) + const { previousSubmissionId } = usePublicFormContext() + const disableSubmitResponseButton = !!previousSubmissionId //disable for MRF 2nd respondent onwards + return ( <> @@ -80,14 +86,16 @@ export const EndPageBlock = ({ - + {disableSubmitResponseButton || ( + + )}