diff --git a/src/components/shareable/overScreens/AlimentationIntegrate.tsx b/src/components/shareable/overScreens/AlimentationIntegrate.tsx index a74a260d0..31060810c 100644 --- a/src/components/shareable/overScreens/AlimentationIntegrate.tsx +++ b/src/components/shareable/overScreens/AlimentationIntegrate.tsx @@ -1,7 +1,7 @@ 'use client' import { useTranslations } from 'next-intl' -import React, { useEffect, useMemo, useState } from 'react' +import { useEffect, useMemo, useState } from 'react' import useParamContext from 'src/providers/ParamProvider' import ClipboardBox from 'components/base/ClipboardBox' import AlimentationListParam from './AlimentationListParam' @@ -14,7 +14,7 @@ const AlimentationIntegrate = () => { const t = useTranslations('alimentation.integrate') const { theme, language, alimentation: alimentationParams } = useParamContext() - const [hideButtons, setHideButtons] = useState(false) + const [showButtons, setShowButtons] = useState(true) const [category, setCategory] = useState(alimentationParams.category) const [customList, setCustomList] = useState(alimentationParams.customList) const [equivalents, setEquivalents] = useState(alimentationParams.equivalents) @@ -25,12 +25,12 @@ const AlimentationIntegrate = () => { const search = useMemo(() => { const result = `&theme=${theme}&language=${language}` - const hideButtonsParam = hideButtons ? '&hideButtons=true' : '' + const hideButtonsParam = showButtons ? '' : '&hideButtons=true' if (customList) { return `alimentationEquivalents=${equivalents.join(',')}${hideButtonsParam}${result}` } return `alimentationCategory=${category}${hideButtonsParam}${result}` - }, [category, customList, equivalents, hideButtons, theme, language]) + }, [category, customList, equivalents, showButtons, theme, language]) return ( <> @@ -63,7 +63,7 @@ const AlimentationIntegrate = () => { slug='hideButtons' integration visible - param={{ value: hideButtons, setter: setHideButtons } as CustomParamValue} + param={{ value: showButtons, setter: setShowButtons } as CustomParamValue} /> diff --git a/src/data/categories.tsx b/src/data/categories.tsx index 9c443f121..4a9d86e70 100644 --- a/src/data/categories.tsx +++ b/src/data/categories.tsx @@ -137,8 +137,8 @@ export const categories: Category[] = [ synonyms: ['manger', 'alimenter'], sources: [ { - label: 'Base Empreinte ADEME', - href: 'https://base-empreinte.ademe.fr/donnees/jeu-donnees', + label: 'Agribalyse 3.1.1 - Mise à jour le 10/08/2023', + href: 'https://agribalyse.ademe.fr/app', }, ], description: 'Pour aborder l’impact carbone de l’alimentation', diff --git a/src/data/categories/repas.ts b/src/data/categories/repas.ts index feaf579a7..d176d5633 100644 --- a/src/data/categories/repas.ts +++ b/src/data/categories/repas.ts @@ -6,6 +6,12 @@ export const repas = [ unit: 'repas', category: 2, total: 7.26, + sources: [ + { + label: 'Base Empreinte ADEME', + href: 'https://base-empreinte.ademe.fr/donnees/jeu-donnees', + }, + ], }, { id: 20683, @@ -13,24 +19,48 @@ export const repas = [ unit: 'repas', category: 2, total: 0.51, + sources: [ + { + label: 'Base Empreinte ADEME', + href: 'https://base-empreinte.ademe.fr/donnees/jeu-donnees', + }, + ], }, { slug: 'repasvegetalien', unit: 'repas', category: 2, total: 0.39, + sources: [ + { + label: 'Base Empreinte ADEME', + href: 'https://base-empreinte.ademe.fr/donnees/jeu-donnees', + }, + ], }, { slug: 'repasavecdupoissonblanc', unit: 'repas', category: 2, total: 1.98, + sources: [ + { + label: 'Base Empreinte ADEME', + href: 'https://base-empreinte.ademe.fr/donnees/jeu-donnees', + }, + ], }, { slug: 'repasavecdupoissongras', unit: 'repas', category: 2, total: 1.11, + sources: [ + { + label: 'Base Empreinte ADEME', + href: 'https://base-empreinte.ademe.fr/donnees/jeu-donnees', + }, + ], }, { id: 20688, @@ -39,5 +69,11 @@ export const repas = [ unit: 'repas', category: 2, total: 1.58, + sources: [ + { + label: 'Base Empreinte ADEME', + href: 'https://base-empreinte.ademe.fr/donnees/jeu-donnees', + }, + ], }, ] diff --git a/src/providers/locales/en.json b/src/providers/locales/en.json index 970e59a1c..159b4b8c0 100644 --- a/src/providers/locales/en.json +++ b/src/providers/locales/en.json @@ -535,7 +535,7 @@ "poissons": "Fish and seafood", "laitier": "Eggs and dairy products", "cereales": "Cereals and legumes", - "autres": "Prepared dishes", + "plats": "Prepared dishes", "encas": "Snacks", "fruits": "Fruits and vegetables", "boucherie": "Butchery", diff --git a/src/providers/locales/es.json b/src/providers/locales/es.json index c9d57d448..6f3c81eb8 100644 --- a/src/providers/locales/es.json +++ b/src/providers/locales/es.json @@ -535,7 +535,7 @@ "poissons": "Pescados y mariscos", "laitier": "Huevos y productos lácteos", "cereales": "Cereales y legumbres", - "autres": "Platos preparados", + "plats": "Platos preparados", "encas": "Aperitivos", "fruits": "Frutas y verduras", "boucherie": "Carnicería", diff --git a/src/providers/locales/fr.json b/src/providers/locales/fr.json index 061c7d116..c7b3dff71 100644 --- a/src/providers/locales/fr.json +++ b/src/providers/locales/fr.json @@ -535,7 +535,7 @@ "poissons": "Poissons et fruits de mer", "laitier": "Oeufs et produits laitiers", "cereales": "Céréales et légumineuses", - "autres": "Plats préparés", + "plats": "Plats préparés", "encas": "En-cas", "fruits": "Fruits et légumes", "boucherie": "Boucherie", diff --git a/src/utils/alimentation.ts b/src/utils/alimentation.ts index 3d8225f47..ff05287ec 100644 --- a/src/utils/alimentation.ts +++ b/src/utils/alimentation.ts @@ -43,7 +43,7 @@ const slugByCategory: Record