Skip to content

Commit

Permalink
add presenttion success page
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass committed Aug 5, 2024
1 parent b4b02cf commit 0e36950
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 1 deletion.
4 changes: 4 additions & 0 deletions web/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@
"title": "Present National ID to the Company Registration Agency",
"subTitle": "Scan the QR code with your wallet app to authenticate with your National ID in order to register your company"
},
"presentationConfirmation": {
"title": "National ID Verified Successfully",
"signInSuccess": "Your national ID has been successfully presented to the company registration agency."
},
"receiveCredentials": {
"title": "Company Registered Successfully",
"subTitle": "Your private limited company has been successfully registered. Scan the QR code with your wallet app to store your company credential."
Expand Down
44 changes: 44 additions & 0 deletions web/src/pages/Company/PresentationConfirmation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { useEffect } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import { Button } from 'antd';
import useStep from '../../utils/useStep';
import { Layout, RandomGraphicElement } from '../../components';
import selv from '../../assets/selvBordered.svg';
import { Trans, useTranslation } from 'react-i18next';
import { useGlobalState } from '../../context/globalState';

/**
* Component which will display a PresentationConfirmation.
*/
const PresentationConfirmation: React.FC = () => {
const { nextStep } = useStep();
const { t } = useTranslation();
const { state } = useGlobalState();

return (
<Layout>
<RandomGraphicElement elements={5}>
<div className='sign-in-confirmation'>
<img src={selv} alt='Selv app logo' />
<h2>{t("pages.company.presentationConfirmation.title")}</h2>
<p>
<Trans
i18nKey="pages.company.presentationConfirmation.signInSuccess"
values={{
DID: state.COMPANY_HOUSE?.connectedDID
}}
components={{ bold: <strong /> }}
/>
</p>
<Link to={nextStep}>
<Button>
{t("actions.continue")}
</Button>
</Link>
</div>
</RandomGraphicElement>
</Layout>
);
};

export default PresentationConfirmation;
4 changes: 3 additions & 1 deletion web/src/pages/Company/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import CompanyDetails from './CompanyDetails';
import Confirmation from './Confirmation';
import ProvideData from './ProvideData';
import ReceiveCredentials from './ReceiveCredentials';
import PresentationConfirmation from './PresentationConfirmation';

export {
ProveIdentity,
Expand All @@ -13,5 +14,6 @@ export {
CompanyDetails,
Confirmation,
ProvideData,
ReceiveCredentials
ReceiveCredentials,
PresentationConfirmation
};
1 change: 1 addition & 0 deletions web/src/steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const routes: Route[] = [
{ path: '/:lng?/company/prove', element: <Company.ProveIdentity />, step: "company", process: "signIn", poweredBy: <Impierce /> },
{ path: '/:lng?/company/signin', element: <Company.SingInConfirmation />, step: "company", process: "signIn", poweredBy: <Impierce /> },
{ path: '/:lng?/company/provide', element: <Company.ProvideData />, step: "company", process: "presentCredential", poweredBy: <Impierce /> },
{ path: '/:lng?/company/provided', element: <Company.PresentationConfirmation />, step: "company", process: "presentCredential", poweredBy: <Impierce /> },
{ path: '/:lng?/company/data', element: <Company.CompanyData />, step: "company", process: "offerCredential", poweredBy: <Impierce /> },
{ path: '/:lng?/company/receive', element: <Company.ReceiveCredentials />, step: "company", process: "issueCredential", poweredBy: <Impierce /> },
{ path: '/:lng?/company/confirm', element: <Company.Confirmation />, step: "company", process: "issueCredential", poweredBy: <Impierce /> },
Expand Down

0 comments on commit 0e36950

Please sign in to comment.