+
{t(affirmationData.titleText)}
{t(affirmationData.description)}
+ {AppUrl.FinalizePreview === currentStep && (
+
diff --git a/products/statement-generator/src/contexts/AffirmationContext.tsx b/products/statement-generator/src/contexts/AffirmationContext.tsx
index 1a98f913..ec1d322a 100644
--- a/products/statement-generator/src/contexts/AffirmationContext.tsx
+++ b/products/statement-generator/src/contexts/AffirmationContext.tsx
@@ -45,6 +45,7 @@ interface AffirmationProps {
isActive: boolean;
titleText: string;
buttonText: string;
+ backButtonText?: string;
description: string;
image?: string;
}
diff --git a/products/statement-generator/src/pages-form/FinalizePreview.tsx b/products/statement-generator/src/pages-form/FinalizePreview.tsx
index 05d9ef49..498ce30e 100644
--- a/products/statement-generator/src/pages-form/FinalizePreview.tsx
+++ b/products/statement-generator/src/pages-form/FinalizePreview.tsx
@@ -1,10 +1,10 @@
import React, { useContext, useState } from 'react';
-import { useHistory } from 'react-router-dom';
import { makeStyles, createStyles } from '@material-ui/core';
import { useTranslation } from 'react-i18next';
import FormStateContext from 'contexts/FormStateContext';
import { AppUrl } from 'contexts/RoutingProps';
+import { AffirmationContext } from 'contexts/AffirmationContext';
import VisibilityIcon from '@material-ui/icons/Visibility';
@@ -13,6 +13,7 @@ import InfoBlock from 'components/InfoBlock';
import ContentContainer from 'components-layout/ContentContainer';
import FlowNavigation from 'components-layout/FlowNavigation';
import Download from 'pages-form/Download';
+import DoneImg from 'assets/done-img.svg';
import { getPreviewStatement, PREVIEW_KEYS } from 'helpers/previewHelper';
@@ -48,8 +49,8 @@ function FinalizeStep() {
const { t } = useTranslation();
const classes = useStyles();
const { formState } = useContext(FormStateContext);
- const history = useHistory();
const [disableNext, setDisableNext] = useState(true);
+ const { updateAffirmationData } = useContext(AffirmationContext);
return (
@@ -90,7 +91,16 @@ function FinalizeStep() {
history.push('/')}
+ onNext={() =>
+ updateAffirmationData({
+ isActive: true,
+ titleText: 'affirmation_popup.done.titleText',
+ description: 'affirmation_popup.done.description',
+ buttonText: 'button.returnHome',
+ backButtonText: 'button.back',
+ image: DoneImg,
+ })
+ }
nextButtonLabel="RETURN HOME"
/>
diff --git a/products/statement-generator/src/styles/utilityStyles.ts b/products/statement-generator/src/styles/utilityStyles.ts
index 70f6b630..7612489f 100644
--- a/products/statement-generator/src/styles/utilityStyles.ts
+++ b/products/statement-generator/src/styles/utilityStyles.ts
@@ -84,6 +84,10 @@ const useUtilityStyles = makeStyles
(
justifyRight: {
justifyContent: 'flex-end',
},
+ spaceBetween: {
+ justifyContent: 'space-between',
+ },
+
flexGrow: {
flex: '1 1 auto',
},