From 4d9f9976e66174cad7bbf36c3ec794539fa47f24 Mon Sep 17 00:00:00 2001 From: Ivar Derksen Date: Tue, 20 Sep 2022 17:06:36 +0200 Subject: [PATCH] Improvement: add back button in EmailSent component --- src/components/login/email_sent.js | 8 ++++++++ src/components/login/index.js | 2 +- src/translations/en.json | 3 ++- src/translations/nl.json | 3 ++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/login/email_sent.js b/src/components/login/email_sent.js index 565ff9a..540e077 100644 --- a/src/components/login/email_sent.js +++ b/src/components/login/email_sent.js @@ -1,14 +1,22 @@ import React from 'react'; import { withTranslation } from 'react-i18next'; import IrmaAppBar from '../../widgets/irma_app_bar'; +import IrmaButton from '../../widgets/irma_button'; import Column from '../../widgets/column'; const EmailSent = (props) => { + const onBack = () => { + props.dispatch({ type: 'loggedOut' }); + }; + return ( <> ,

{props.t('explanation')}

+ + {props.t('back')} +
); diff --git a/src/components/login/index.js b/src/components/login/index.js index 2feafbb..7da1ec8 100644 --- a/src/components/login/index.js +++ b/src/components/login/index.js @@ -18,7 +18,7 @@ const Login = (props) => { case 'selectCandidate': return ; case 'emailSent': - return ; + return ; default: return ; } diff --git a/src/translations/en.json b/src/translations/en.json index e4afbc0..5388951 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -27,7 +27,8 @@ }, "login-email-sent": { "title": "Check your email", - "explanation": "Log in by clicking on the link that has been sent to your email address. If you did not receive anything, then the email address you entered was probably not known to us." + "explanation": "Log in by clicking on the link that has been sent to your email address. If you did not receive anything, then the email address you entered was probably not known to us.", + "back": "Back" }, "registration-verified": { "title": "MyIRMA registration finished", diff --git a/src/translations/nl.json b/src/translations/nl.json index 4cd0b1e..2f4ae8e 100644 --- a/src/translations/nl.json +++ b/src/translations/nl.json @@ -27,7 +27,8 @@ }, "login-email-sent": { "title": "Controleer je e-mail", - "explanation": "Log in door te klikken op de link die naar je e-mailadres is verstuurd. Als je niets ontvangen hebt, dan was het ingevulde e-mailadres vermoedelijk niet bekend bij ons." + "explanation": "Log in door te klikken op de link die naar je e-mailadres is verstuurd. Als je niets ontvangen hebt, dan was het ingevulde e-mailadres vermoedelijk niet bekend bij ons.", + "back": "Terug" }, "registration-verified": { "title": "MijnIRMA-registratie klaar",