Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VAS-418] feat: Align TOS page with UI design #579

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 29 additions & 32 deletions src/components/TOS/TOSWall.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
import {Trans, useTranslation} from 'react-i18next';
import {Box, Typography, Link} from '@mui/material';
import {TOSAgreement} from '@pagopa/mui-italia';
import {Link as RouterLink} from 'react-router-dom';
import { Trans, useTranslation } from 'react-i18next';
import { Box, Link } from '@mui/material';
import { TOSAgreement } from '@pagopa/mui-italia';
import { Link as RouterLink } from 'react-router-dom';

interface TOSWallProps {
acceptTOS: () => void;
detailRoute: string;
acceptTOS: () => void;
detailRoute: string;
}

const TOSWall = ({acceptTOS, detailRoute}: TOSWallProps) => {
const {t} = useTranslation();
return (
<Box width="100%" px={2}>
<TOSAgreement
productName={t('tos.title')}
description={t('tos.description')}
onConfirm={() => acceptTOS()}
const TOSWall = ({ acceptTOS, detailRoute }: TOSWallProps) => {
const { t } = useTranslation();
return (
<Box width="100%" px={2}>
<TOSAgreement
productName={t('tos.title')}
description={
<Trans i18nKey="tos.termsDescription">
{t('tos.termsDescription')}
<Link
component={RouterLink}
to={{
pathname: detailRoute,
}}
sx={{ color: 'primary.main', cursor: 'pointer', textDecoration: 'none' }}
>
<Typography sx={{px: 8}} color="text.secondary">
<Trans i18nKey="tos.termsDescription">
Entrando dichiari di aver letto e accettato l’Informativa Privacy e i Termini e
condizioni d’uso di PagoPA
<Link
component={RouterLink}
to={{
pathname: detailRoute,
}}
sx={{color: 'primary.main', cursor: 'pointer', textDecoration: 'none'}}
>
<strong> Accedi</strong>
</Link>
</Trans>
</Typography>
</TOSAgreement>
</Box>
);
<strong> Accedi</strong>
</Link>
</Trans>
}
onConfirm={() => acceptTOS()}
></TOSAgreement>
</Box>
);
};

export default TOSWall;
5 changes: 2 additions & 3 deletions src/locale/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1490,9 +1490,8 @@
"backButton": "Esci"
},
"tos": {
"title": "pagoPA",
"description": "Prima di entrare, leggi e accetta l’Informativa Privacy e i Termini e condizioni d’uso. Potrai consultarli di nuovo quando vuoi: li trovi sempre in fondo alla pagina.",
"termsDescription": "Entrando dichiari di aver letto e accettato l’<1>Informativa Privacy</1> e i <1>Termini e condizioni d’uso</1> di PagoPA"
"title": "Pagamenti pagoPA",
"termsDescription": "Accedendo, accetti i <1>Termini e condizioni d’uso</1> del servizio e confermi di avere letto l’<1>Informativa Privacy</1>. "
},
"general": {
"noDataLabel": "Nessun risultato",
Expand Down
Loading