From 89716226a2883d0177d8161d80cb8e4b66cbf0f4 Mon Sep 17 00:00:00 2001 From: Adel LAKHDAR <alakhdar@grandlyon.com> Date: Thu, 11 Apr 2024 14:57:14 +0000 Subject: [PATCH] feat(edition): add challenge page to edition --- src/components/Newsletter/CustomLink.tsx | 29 +++++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/components/Newsletter/CustomLink.tsx b/src/components/Newsletter/CustomLink.tsx index 0a349213..6157f867 100644 --- a/src/components/Newsletter/CustomLink.tsx +++ b/src/components/Newsletter/CustomLink.tsx @@ -15,26 +15,43 @@ const CustomLink: React.FC<EcolyoLinkProps> = ({ onChange, editorState }) => { const [open, setOpen] = useState<boolean>(false) const links: LinkState[] = [ { - displayTitle: 'Consommation', - link: 'consumption', + displayTitle: 'Analyse', + link: 'analysis', }, { displayTitle: 'Astuces', link: 'ecogestures', }, { - displayTitle: 'Sélection des Astuces', - link: 'ecogesture-selection', + displayTitle: 'Consommation', + link: 'consumption', }, { - displayTitle: 'Analyse', - link: 'analysis', + displayTitle: "Consommation d'eau", + link: 'consumption/water', + }, + { + displayTitle: "Consommation d'électricité", + link: 'consumption/electricity', + }, + { + displayTitle: 'Consommation de gaz', + link: 'consumption/gas', + }, + { + displayTitle: 'Défis', + link: 'challenges', }, { displayTitle: 'Options', link: 'options', }, + { + displayTitle: 'Sélection des Astuces', + link: 'ecogesture-selection', + }, ] + const appendLink = (link: LinkState) => { const data = `<a href="{cozyUrl}${link.link}">${link.displayTitle}</a>` const { contentBlocks, entityMap } = htmlToDraft(data) -- GitLab