Skip to content

Commit

Permalink
Merge pull request #26 from privacybydesign/email-sent-back-button
Browse files Browse the repository at this point in the history
Improvement: add back button in EmailSent component
  • Loading branch information
ivard authored Sep 26, 2022
2 parents 985961f + 4d9f997 commit 3202ab4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/components/login/email_sent.js
Original file line number Diff line number Diff line change
@@ -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 (
<>
<IrmaAppBar title={props.t('title')} />,
<Column>
<p>{props.t('explanation')}</p>
<IrmaButton theme={'primary'} onClick={onBack}>
{props.t('back')}
</IrmaButton>
</Column>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Login = (props) => {
case 'selectCandidate':
return <SelectCandidate dispatch={props.dispatch} candidates={props.candidates} token={props.token} />;
case 'emailSent':
return <EmailSent />;
return <EmailSent dispatch={props.dispatch} />;
default:
return <LoadingSpinner />;
}
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3202ab4

Please sign in to comment.