Skip to content
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
Binary file removed public/images/category-pompe-chaleur.jpg
Binary file not shown.
Binary file added public/images/epargnonsnosressources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/gagner-place.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/hiver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/images/osez-changer-tri.png
Binary file not shown.
Binary file added public/images/sobriete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
279 changes: 269 additions & 10 deletions src/components/shareable/overScreens/Values/Category.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,33 +44,40 @@ export const overScreenCategoryValues: (category: Category) => Record<string, Ov
title: 'next-actions',
children: (
<div className={styles.ressourceContainer}>
<Resource
image='/images/category-pompe-chaleur.jpg'
text='pompe-chaleur'
href='https://librairie.ademe.fr/changement-climatique-et-energie/6714-s-equiper-d-une-pompe-a-chaleur.html'
withLink='ADEME'
tracking={category ? category.name : 'Comparateur'}
/>
<Resource
image='/images/category-chauffage-bois.jpg'
text='chauffage-bois'
href='https://librairie.ademe.fr/urbanisme-et-batiment/5667-adopter-le-chauffage-au-bois-9791029719769.html'
withLink='ADEME'
tracking={category ? category.name : 'Comparateur'}
tracking='Chauffage'
/>
<Resource
image='/images/category-wattris.png'
text='wattris'
href='https://wattris.ademe.fr/'
withLink='Wattris'
tracking={category ? category.name : 'Comparateur'}
tracking='Chauffage'
/>
<Resource
image='/images/agir.png'
text='chauffage'
href='https://agirpourlatransition.ademe.fr/particuliers/maison/chauffage'
withLink='Agir pour la transition'
tracking='Chauffage'
/>
<Resource
image='/images/hiver.png'
text='hiver'
href='https://librairie.ademe.fr/batiment/8106-9873-comment-passer-un-hiver-au-chaud--9791029725210.html#/43-type_de_produit-format_imprime'
withLink='La librairie ADEME'
tracking='Chauffage'
/>
<Resource
image='/images/ngc.png'
text='ngc'
href='https://nosgestesclimat.fr/'
withLink='Nos Gestes Climat'
tracking={category ? category.name : 'Comparateur'}
tracking='Chauffage'
imgSize='4.5rem'
/>
</div>
Expand Down Expand Up @@ -140,6 +147,13 @@ export const overScreenCategoryValues: (category: Category) => Record<string, Ov
withLink='ADEME'
tracking='fruitsetlegumes'
/>
<Resource
image='/images/agir.png'
text='alimentation-responsable'
href='https://agirpourlatransition.ademe.fr/particuliers/conso/alimentation'
withLink='Agir pour la transition'
tracking='fruitsetlegumes'
/>
<Resource
image='/images/ngc.png'
text='ngc'
Expand Down Expand Up @@ -178,6 +192,20 @@ export const overScreenCategoryValues: (category: Category) => Record<string, Ov
tracking='Transport'
imgSize='4.5rem'
/>
<Resource
image='/images/agir.png'
text='deplacements'
href='https://agirpourlatransition.ademe.fr/particuliers/bureau/deplacements'
withLink='Agir pour la transition'
tracking='Transport'
/>
<Resource
image='/images/agir.png'
text='vacances'
href='https://agirpourlatransition.ademe.fr/particuliers/conso/vacances'
withLink='Agir pour la transition'
tracking='Transport'
/>
</div>
),
},
Expand Down Expand Up @@ -208,6 +236,20 @@ export const overScreenCategoryValues: (category: Category) => Record<string, Ov
title: 'next-actions',
children: (
<div className={styles.ressourceContainer}>
<Resource
image='/images/agir.png'
text='numerique-responsable'
href='https://agirpourlatransition.ademe.fr/particuliers/maison/numerique'
withLink='Agir pour la transition'
tracking='Usage numérique'
/>
<Resource
image='/images/sobriete.png'
text='sobriete'
href='https://librairie.ademe.fr/consommer-autrement/7575-9196-comment-adopter-la-sobriete-numerique--9791029724237.html#/43-type_de_produit-format_imprime'
withLink='ADEME'
tracking='Usage numérique'
/>
<Resource
image='/images/ngc.png'
text='ngc'
Expand Down Expand Up @@ -263,6 +305,27 @@ export const overScreenCategoryValues: (category: Category) => Record<string, Ov
withLink='Infographie ADEME'
tracking='Livraison'
/>
<Resource
image='/images/agir.png'
text='agir-livraison'
href='https://agirpourlatransition.ademe.fr/particuliers/conso'
withLink='Agir pour la transition'
tracking='Livraison'
/>
<Resource
image='/images/epargnonsnosressources.png'
text='epargnonsnosressources'
href='https://epargnonsnosressources.gouv.fr/evaluer-besoin-avant-achat/'
withLink='Épargnons nos ressources'
tracking='Livraison'
/>
<Resource
image='/images/gagner-place.png'
text='gagner-place'
href='https://librairie.ademe.fr/consommer-autrement/8192-9957-comment-gagner-de-la-place-chez-soi--9791029725135.html#/43-type_de_produit-format_imprime'
withLink='La librairie ADEME'
tracking='Livraison'
/>
</div>
),
},
Expand Down Expand Up @@ -316,6 +379,13 @@ export const overScreenCategoryValues: (category: Category) => Record<string, Ov
withLink='Télécharger les 66 fiches'
tracking='Alimentation'
/>
<Resource
image='/images/agir.png'
text='alimentation-responsable'
href='https://agirpourlatransition.ademe.fr/particuliers/conso/alimentation'
withLink='Agir pour la transition'
tracking='Alimentation'
/>
<Resource
image='/images/ngc.png'
text='ngc'
Expand All @@ -334,5 +404,194 @@ export const overScreenCategoryValues: (category: Category) => Record<string, Ov
},
}
}
if (category.slug === 'repas') {
Copy link

Copilot AI May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overScreenCategoryValues function has grown large with repeated conditional blocks. Consider extracting resource definitions into a configuration map or separate data structure to reduce duplication and improve readability.

Copilot uses AI. Check for mistakes.
return {
...values,
hypothesis: {
image: '/images/icn-next-actions.svg',
title: 'next-actions',
children: (
<div className={styles.ressourceContainer}>
<Resource
image='/images/agir.png'
text='alimentation-responsable'
href='https://agirpourlatransition.ademe.fr/particuliers/conso/alimentation'
withLink='Agir pour la transition'
tracking='Repas'
/>
<Resource
image='/images/ngc.png'
text='ngc'
href='https://nosgestesclimat.fr/'
withLink='Nos Gestes Climat'
tracking='Repas'
imgSize='4.5rem'
/>
</div>
),
},
}
}
if (category.slug === 'boisson') {
return {
...values,
hypothesis: {
image: '/images/icn-next-actions.svg',
title: 'next-actions',
children: (
<div className={styles.ressourceContainer}>
<Resource
image='/images/agir.png'
text='alimentation-responsable'
href='https://agirpourlatransition.ademe.fr/particuliers/conso/alimentation'
withLink='Agir pour la transition'
tracking='Boisson'
/>
<Resource
image='/images/ngc.png'
text='ngc'
href='https://nosgestesclimat.fr/'
withLink='Nos Gestes Climat'
tracking='Boisson'
imgSize='4.5rem'
/>
</div>
),
},
}
}
if (category.slug === 'electromenager') {
return {
...values,
hypothesis: {
image: '/images/icn-next-actions.svg',
title: 'next-actions',
children: (
<div className={styles.ressourceContainer}>
<Resource
image='/images/agir.png'
text='gestes'
href='https://agirpourlatransition.ademe.fr/particuliers/maison/economies-denergie-deau'
withLink='Agir pour la transition'
tracking='Électroménager'
/>
<Resource
image='/images/ngc.png'
text='ngc'
href='https://nosgestesclimat.fr/'
withLink='Nos Gestes Climat'
tracking='Électroménager'
imgSize='4.5rem'
/>
</div>
),
},
}
}
if (category.slug === 'habillement') {
return {
...values,
hypothesis: {
image: '/images/icn-next-actions.svg',
title: 'next-actions',
children: (
<div className={styles.ressourceContainer}>
<Resource
image='/images/agir.png'
text='mode'
href='https://agirpourlatransition.ademe.fr/particuliers/conso/mode'
withLink='Agir pour la transition'
tracking='Habillement'
/>
<Resource
image='/images/gagner-place.png'
text='gagner-place'
href='https://librairie.ademe.fr/consommer-autrement/8192-9957-comment-gagner-de-la-place-chez-soi--9791029725135.html#/43-type_de_produit-format_imprime'
withLink='La librairie ADEME'
tracking='Habillement'
/>
<Resource
image='/images/ngc.png'
text='ngc'
href='https://nosgestesclimat.fr/'
withLink='Nos Gestes Climat'
tracking='Habillement'
imgSize='4.5rem'
/>
</div>
),
},
}
}
if (category.slug === 'mobilier') {
return {
...values,
hypothesis: {
image: '/images/icn-next-actions.svg',
title: 'next-actions',
children: (
<div className={styles.ressourceContainer}>
<Resource
image='/images/agir.png'
text='habitation'
href='https://agirpourlatransition.ademe.fr/particuliers/maison/emmenagement'
withLink='Agir pour la transition'
tracking='Mobilier'
/>
<Resource
image='/images/gagner-place.png'
text='gagner-place'
href='https://librairie.ademe.fr/consommer-autrement/8192-9957-comment-gagner-de-la-place-chez-soi--9791029725135.html#/43-type_de_produit-format_imprime'
withLink='La librairie ADEME'
tracking='Mobilier'
/>
<Resource
image='/images/ngc.png'
text='ngc'
href='https://nosgestesclimat.fr/'
withLink='Nos Gestes Climat'
tracking='Mobilier'
imgSize='4.5rem'
/>
</div>
),
},
}
}
if (category.slug === 'numerique') {
return {
...values,
hypothesis: {
image: '/images/icn-next-actions.svg',
title: 'next-actions',
children: (
<div className={styles.ressourceContainer}>
<Resource
image='/images/agir.png'
text='numerique-responsable'
href='https://agirpourlatransition.ademe.fr/particuliers/maison/numerique'
withLink='Agir pour la transition'
tracking='Numérique'
/>
<Resource
image='/images/sobriete.png'
text='sobriete'
href='https://librairie.ademe.fr/consommer-autrement/7575-9196-comment-adopter-la-sobriete-numerique--9791029724237.html#/43-type_de_produit-format_imprime'
withLink='ADEME'
tracking='Numérique'
/>
<Resource
image='/images/ngc.png'
text='ngc'
href='https://nosgestesclimat.fr/'
withLink='Nos Gestes Climat'
tracking='Numérique'
imgSize='4.5rem'
/>
</div>
),
},
}
}
return values
}
8 changes: 4 additions & 4 deletions src/components/shareable/overScreens/Values/OsezChanger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ export const overScreenOsezChangerValues: () => Record<string, OverScreenInfo> =
tracking='OsezChanger'
/>
<Resource
image='/images/osez-changer-tri.png'
text='tri'
href='https://librairie.ademe.fr/consommer-autrement/5271-comment-faire-de-la-place-chez-soi-.html'
image='/images/gagner-place.png'
text='gagner-place'
href='https://librairie.ademe.fr/consommer-autrement/8192-9957-comment-gagner-de-la-place-chez-soi--9791029725135.html#/43-type_de_produit-format_imprime'
tracking='OsezChanger'
/>
<Resource
image='/images/osez-changer-questions.png'
text='questions'
href='https://librairie.ademe.fr/cadic/1529/le-revers-de-mon-look.pdf'
href='https://librairie.ademe.fr/consommer-autrement/3882-exposition-le-revers-de-mon-look-quels-impacts-ont-mes-vetements-sur-la-planete-.html'
tracking='OsezChanger'
/>
<Resource
Expand Down
14 changes: 13 additions & 1 deletion src/providers/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,13 +555,25 @@
"tri": "Sort through your cupboards to make more space at home",
"questions": "Ask yourself the right questions before buying: Do I really need it?",
"deuxieme-vie": "Give a second life to unused clothes and shoes",
"pompe-chaleur": "Equip yourself with a heat pump",
"chauffage-bois": "Adopt wood heating",
"wattris": "Simulate the electrical consumption of your home",
"ngc": "Estimate your consumption carbon footprint",
"lvao": "Extend the life of your objects",
"agir-tt": "What does telecommuting change for the planet?",
"agir-alimentation": "Understand everything: a more sustainable diet",
"agir-livraison": "Learn to consume differently",
"epargnonsnosressources": "Assess your real need before buying",
"gagner-place": "Make more space at home?",
"deplacements": "Learn to travel differently",
"vacances": "Learn about more responsible vacations",
"alimentation-responsable": "Learn about more responsible food choices",
"chauffage": "Learn to heat your home differently",
"hiver": "How to stay warm in winter?",
"gestes": "Learn about everyday eco-friendly actions",
"mode": "Learn about responsible fashion",
"numerique-responsable": "Learn about responsible digital practices",
"sobriete": "How to adopt digital sobriety?",
"habitation": "Learn about responsible housing",
"calendar": "Seasonal fruits and vegetables calendar",
"leger": "How to work with a low impact ?",
"ecoresponsable": "Eco-responsible at work",
Expand Down
Loading
Loading