From f2a60befdf90a8c6aa33f31bfe1e1aeec6c602ae Mon Sep 17 00:00:00 2001 From: Bastien DUMONT <bdumont@grandlyon.com> Date: Fri, 24 Feb 2023 13:18:15 +0000 Subject: [PATCH] fix: remove duplicate titles in options --- src/components/GCU/GCUContent.tsx | 19 +++---------------- src/components/GCU/GCULink.tsx | 2 +- .../__snapshots__/GCUContent.spec.tsx.snap | 10 ---------- .../LegalNotice/LegalNoticeContent.tsx | 6 ++---- .../LegalNoticeContent.spec.tsx.snap | 3 --- .../LegalNoticeLink.spec.tsx.snap | 2 +- .../__snapshots__/CGUModal.spec.tsx.snap | 10 ---------- .../LegalNoticeModal.spec.tsx.snap | 6 ------ src/locales/fr.json | 7 +------ 9 files changed, 8 insertions(+), 57 deletions(-) diff --git a/src/components/GCU/GCUContent.tsx b/src/components/GCU/GCUContent.tsx index ec398cb5d..1ecb3fcc6 100644 --- a/src/components/GCU/GCUContent.tsx +++ b/src/components/GCU/GCUContent.tsx @@ -1,28 +1,15 @@ -import React from 'react' -import './gcuContent.scss' import { useI18n } from 'cozy-ui/transpiled/react/I18n' +import React from 'react' import { decoreText } from 'utils/decoreText' +import './gcuContent.scss' -interface GCUContentProps { - fromOption?: boolean -} - -const GCUContent: React.FC<GCUContentProps> = ({ - fromOption = false, -}: GCUContentProps) => { +const GCUContent = (): JSX.Element => { const { t } = useI18n() return ( <div className="gcu-content-root"> <div className="gcu-content-wrapper"> - <h1 className="gcu-content-title text-22-normal">{t('gcu.title')}</h1> <p className="text-14-normal version">{t('gcu.version')}</p> - {fromOption && ( - <h2 className="gcu-content-subtitle text-16-italic"> - {t('gcu.subtitle')} - </h2> - )} - <div className="gcu-content-part-title text-15-normal"> {t('gcu.content.title1')} </div> diff --git a/src/components/GCU/GCULink.tsx b/src/components/GCU/GCULink.tsx index f1ce6a8c5..aca473ce3 100644 --- a/src/components/GCU/GCULink.tsx +++ b/src/components/GCU/GCULink.tsx @@ -25,7 +25,7 @@ const GCULink: React.FC = () => { size={42} /> <div className="gcu-link-card-content-title"> - {t('gcu_option.title')} + {t('common.title_gcu')} </div> </div> </div> diff --git a/src/components/GCU/__snapshots__/GCUContent.spec.tsx.snap b/src/components/GCU/__snapshots__/GCUContent.spec.tsx.snap index 67a32efc1..007cca08c 100644 --- a/src/components/GCU/__snapshots__/GCUContent.spec.tsx.snap +++ b/src/components/GCU/__snapshots__/GCUContent.spec.tsx.snap @@ -7,11 +7,6 @@ exports[`GCUContent component should be rendered correctly 1`] = ` <div className="gcu-content-wrapper" > - <h1 - className="gcu-content-title text-22-normal" - > - gcu.title - </h1> <p className="text-14-normal version" > @@ -299,11 +294,6 @@ exports[`GCUContent component should display a link when translation contains <a <div className="gcu-content-wrapper" > - <h1 - className="gcu-content-title text-22-normal" - > - gcu.title - </h1> <p className="text-14-normal version" > diff --git a/src/components/LegalNotice/LegalNoticeContent.tsx b/src/components/LegalNotice/LegalNoticeContent.tsx index 4b14ca7f0..c19f2bff7 100644 --- a/src/components/LegalNotice/LegalNoticeContent.tsx +++ b/src/components/LegalNotice/LegalNoticeContent.tsx @@ -1,8 +1,7 @@ -import React from 'react' - -import './legalNoticeView.scss' import { useI18n } from 'cozy-ui/transpiled/react/I18n' +import React from 'react' import { decoreText } from 'utils/decoreText' +import './legalNoticeView.scss' const LegalNoticeContent: React.FC = () => { const { t } = useI18n() @@ -10,7 +9,6 @@ const LegalNoticeContent: React.FC = () => { <> <div className="legal-notice-root"> <div className="legal-notice-content"> - <h2>{t('legal.title_legal')}</h2> <p className="version">{t('legal.version')}</p> <p>{decoreText(t('legal.site'))}</p> <p>{t('legal.adress')}</p> diff --git a/src/components/LegalNotice/__snapshots__/LegalNoticeContent.spec.tsx.snap b/src/components/LegalNotice/__snapshots__/LegalNoticeContent.spec.tsx.snap index f1a119c2c..69a5b0540 100644 --- a/src/components/LegalNotice/__snapshots__/LegalNoticeContent.spec.tsx.snap +++ b/src/components/LegalNotice/__snapshots__/LegalNoticeContent.spec.tsx.snap @@ -8,9 +8,6 @@ exports[`LegalNoticeContent component should be rendered correctly 1`] = ` <div className="legal-notice-content" > - <h2> - legal.title_legal - </h2> <p className="version" > diff --git a/src/components/LegalNotice/__snapshots__/LegalNoticeLink.spec.tsx.snap b/src/components/LegalNotice/__snapshots__/LegalNoticeLink.spec.tsx.snap index 3192ae8c7..39d58611a 100644 --- a/src/components/LegalNotice/__snapshots__/LegalNoticeLink.spec.tsx.snap +++ b/src/components/LegalNotice/__snapshots__/LegalNoticeLink.spec.tsx.snap @@ -35,7 +35,7 @@ exports[`GCULink component should be rendered correctly 1`] = ` <div className="gcu-link-card-content-title" > - gcu_option.title + common.title_gcu </div> </div> </div> diff --git a/src/components/Terms/__snapshots__/CGUModal.spec.tsx.snap b/src/components/Terms/__snapshots__/CGUModal.spec.tsx.snap index 121ce5fb7..f4c8c69d3 100644 --- a/src/components/Terms/__snapshots__/CGUModal.spec.tsx.snap +++ b/src/components/Terms/__snapshots__/CGUModal.spec.tsx.snap @@ -437,11 +437,6 @@ exports[`CGUModal component should be rendered correctly 1`] = ` <div class="gcu-content-wrapper" > - <h1 - class="gcu-content-title text-22-normal" - > - gcu.title - </h1> <p class="text-14-normal version" > @@ -1069,11 +1064,6 @@ exports[`CGUModal component should be rendered correctly 1`] = ` <div className="gcu-content-wrapper" > - <h1 - className="gcu-content-title text-22-normal" - > - gcu.title - </h1> <p className="text-14-normal version" > diff --git a/src/components/Terms/__snapshots__/LegalNoticeModal.spec.tsx.snap b/src/components/Terms/__snapshots__/LegalNoticeModal.spec.tsx.snap index dc4900b2b..5f0316320 100644 --- a/src/components/Terms/__snapshots__/LegalNoticeModal.spec.tsx.snap +++ b/src/components/Terms/__snapshots__/LegalNoticeModal.spec.tsx.snap @@ -437,9 +437,6 @@ exports[`LegalNoticeModal component should be rendered correctly 1`] = ` <div class="legal-notice-content" > - <h2> - legal.title_legal - </h2> <p class="version" > @@ -1053,9 +1050,6 @@ exports[`LegalNoticeModal component should be rendered correctly 1`] = ` <div className="legal-notice-content" > - <h2> - legal.title_legal - </h2> <p className="version" > diff --git a/src/locales/fr.json b/src/locales/fr.json index c2a865b22..17060aa0b 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -14,7 +14,7 @@ "title_analysis": "Analyse", "title_profiletype": "Ajuster mon profil", "title_legal_notice": "Mentions légales", - "title_gcu": "CGU", + "title_gcu": "Conditions générales d’utilisation", "title_sge_connect": "Connexion à l'électricité", "accessibility": { "loading": "Chargement" @@ -649,7 +649,6 @@ }, "gcu": { "title": "Conditions générales d’utilisation du service", - "subtitle": "Envie de prendre le temps de relire ces CGU ces Conditions Générales d’Utilisation plus tard\u00a0? Vous pourrez les retrouver dans la page Options du service.", "version": "Version du 12.12.2022", "content": { "title1": "Ecolyo, késako\u00a0?", @@ -712,10 +711,6 @@ "button_accept": "Accepter les conditions générales d'utilisation" } }, - "gcu_option": { - "title": "Conditions générales d’utilisation", - "read_gcu": "Lire les CGU" - }, "matomo": { "matomo_title": "Suivi statistiques d'usage Matomo" }, -- GitLab