From d2ff9b3be84c030d4e0db8b70ef12553620806eb Mon Sep 17 00:00:00 2001 From: Adel LAKHDAR <alakhdar@grandlyon.com> Date: Thu, 11 Apr 2024 16:54:24 +0200 Subject: [PATCH] Alphabetical order for links --- src/components/Newsletter/CustomLink.tsx | 29 ++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/components/Newsletter/CustomLink.tsx b/src/components/Newsletter/CustomLink.tsx index 53a6d360..6157f867 100644 --- a/src/components/Newsletter/CustomLink.tsx +++ b/src/components/Newsletter/CustomLink.tsx @@ -15,17 +15,25 @@ 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: "Consommation d'électricité", - link: 'consumption/electricity', + displayTitle: 'Astuces', + link: 'ecogestures', + }, + { + displayTitle: 'Consommation', + link: 'consumption', }, { displayTitle: "Consommation d'eau", link: 'consumption/water', }, + { + displayTitle: "Consommation d'électricité", + link: 'consumption/electricity', + }, { displayTitle: 'Consommation de gaz', link: 'consumption/gas', @@ -35,22 +43,15 @@ const CustomLink: React.FC<EcolyoLinkProps> = ({ onChange, editorState }) => { link: 'challenges', }, { - displayTitle: 'Astuces', - link: 'ecogestures', + displayTitle: 'Options', + link: 'options', }, { displayTitle: 'Sélection des Astuces', link: 'ecogesture-selection', }, - { - displayTitle: 'Analyse', - link: 'analysis', - }, - { - displayTitle: 'Options', - link: 'options', - }, ] + const appendLink = (link: LinkState) => { const data = `<a href="{cozyUrl}${link.link}">${link.displayTitle}</a>` const { contentBlocks, entityMap } = htmlToDraft(data) -- GitLab