Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass committed Sep 6, 2024
1 parent 1765b33 commit 6637595
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 120 deletions.
85 changes: 8 additions & 77 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@
},
"dependencies": {
"@ant-design/icons": "^5.3.7",
"@types/classnames": "^2.2.11",
"antd": "^5.12.8",
"aos": "^3.0.0-beta.6",
"axios": "^1.6.5",
"buffer": "^6.0.3",
"classnames": "^2.2.6",
"crypto-browserify": "^3.12.0",
"i18next": "^23.7.16",
"i18next-browser-languagedetector": "^7.2.0",
"i18next-http-backend": "^2.4.2",
"randomstring": "^1.1.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^14.0.0",
Expand Down Expand Up @@ -62,6 +59,7 @@
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"@types/aos": "^3.0.3",
"@types/classnames": "^2.3.1",
"@types/jest": "^27.5.2",
"@types/node": "^20.10.7",
"@types/qrcode.react": "^1.0.1",
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/AppPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const AppPicker: React.FC = () => {
<h2 className='subTitle'>{t("pages.walletSelect.subTitle")}</h2>
<div className='apps'>
{randomOrderWallets.map(wallet => (
<div className="app">
<div className="app" key={wallet.name}>
<section className="app__wrapper">
<div className='app__column'>
{wallet.logo}
Expand All @@ -61,7 +61,7 @@ const AppPicker: React.FC = () => {
</Button>
</div>
</div>
<img className="app__image" src={wallet.image}></img>
<img className="app__image" alt={wallet.name} src={wallet.image}></img>
</section>
<Modal
open={open === wallet.name}
Expand Down
24 changes: 4 additions & 20 deletions web/src/pages/Company/ProveIdentity.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
import randomstring from 'randomstring';
import React, { useCallback, useEffect } from 'react';
import { Layout, Loading, QRCode, RandomGraphicElement } from '../../components';
import useStep from '../../utils/useStep';
import { useTranslation, Trans } from 'react-i18next';
import { Router, useNavigate } from 'react-router';
import { useNavigate } from 'react-router';
import { Actions, useCredentialsDispatch, useGlobalState } from '../../context/globalState';
import { Providers } from '@shared/types/Providers';
import { Issuers } from '@shared/types/Issuers';
import { Scopes } from '@shared/types/Scopes';
import { copyFile } from 'fs';

const ProveIdentity: React.FC = () => {
const { t } = useTranslation();

const { nextStep } = useStep();
const navigate = useNavigate();
const [loading, setLoading] = useState(true);
const [status, setStatus] = useState("pages.general.proveIdentity.waitingForLogin");
const dispatch = useCredentialsDispatch();
const { state } = useGlobalState();

Expand All @@ -34,17 +29,6 @@ const ProveIdentity: React.FC = () => {
goToNextStep();
}
}, [state, goToNextStep])

const messages = {
waiting: 'general.messages.waiting',
connectionError: 'general.messages.connectionError',
missing: 'general.messages.missing',
verifying: 'general.messages.verifying'
};

function setStatusMessage(message: string) {
setStatus(message);
}

return (
<Layout>
Expand All @@ -57,8 +41,8 @@ const ProveIdentity: React.FC = () => {
<div className='qr-wrapper'>
<QRCode text={state[Scopes.CompanyHouse]?.QRcontent} />
</div>
<p className='bold'>{t(status)}</p>
{loading && <Loading />}
<p className='bold'>{t("pages.general.proveIdentity.waitingForLogin")}</p>
<Loading />
</div>
</RandomGraphicElement>
</Layout>
Expand Down
1 change: 0 additions & 1 deletion web/src/pages/Company/ProvideData.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
import randomstring from 'randomstring';
import { Layout, Loading, QRCode, RandomGraphicElement } from '../../components';
import useStep from '../../utils/useStep';
import { useTranslation, Trans } from 'react-i18next';
Expand Down
19 changes: 3 additions & 16 deletions web/src/pages/Government/ProveIdentity.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState } from 'react';
import React, { useCallback, useEffect } from 'react';
import { Layout, Loading, QRCode, RandomGraphicElement } from '../../components';
import useStep from '../../utils/useStep';
import { useTranslation, Trans } from 'react-i18next';
Expand All @@ -12,8 +12,6 @@ const ProveIdentity: React.FC = () => {

const { nextStep } = useStep();
const navigate = useNavigate();
const [loading, setLoading] = useState(true);
const [status, setStatus] = useState("pages.general.proveIdentity.waitingForLogin");
const dispatch = useCredentialsDispatch();
const { state } = useGlobalState();

Expand All @@ -31,17 +29,6 @@ const ProveIdentity: React.FC = () => {
goToNextStep();
}
}, [state, goToNextStep])

const messages = {
waiting: 'general.messages.waiting',
connectionError: 'general.messages.connectionError',
missing: 'general.messages.missing',
verifying: 'general.messages.verifying'
};

function setStatusMessage(message: string) {
setStatus(message);
}

return (
<Layout>
Expand All @@ -54,8 +41,8 @@ const ProveIdentity: React.FC = () => {
<div className='qr-wrapper'>
<QRCode text={state[Scopes.Government]?.QRcontent} />
</div>
<p className='bold'>{t(status)}</p>
{loading && <Loading />}
<p className='bold'>{t("pages.general.proveIdentity.waitingForLogin")}</p>
<Loading />
</div>
</RandomGraphicElement>
</Layout>
Expand Down
3 changes: 2 additions & 1 deletion web/src/styles/pages/appPicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
margin-bottom: 20px;
text-align: center;
}

h2 {
@include themify($themes) {
color: themed("trinaryColor");
font-size: themed("h2TextSize");
line-height: themed("h2LineHeight");
}
font-weight: 400;
}

p {
Expand Down

0 comments on commit 6637595

Please sign in to comment.