From 8281177155ea0e41a2e1ea488495fda612695ab2 Mon Sep 17 00:00:00 2001
From: carolineBda
Date: Fri, 15 Sep 2023 17:17:30 +0200
Subject: [PATCH] =?UTF-8?q?ajout=20de=20la=20section=20"pour=20aller=20plu?=
=?UTF-8?q?s=20loin"=20sur=20la=20page=20g=C3=A9n=C3=A9ric?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/contribution/[slug].tsx | 1 +
.../src/contributions/ContributionCC.tsx | 19 +++++++--------
.../src/contributions/ContributionGeneric.tsx | 23 ++++++++++++++++++-
3 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/packages/code-du-travail-frontend/pages/contribution/[slug].tsx b/packages/code-du-travail-frontend/pages/contribution/[slug].tsx
index 86d0e18b6d..9c876d2ff1 100644
--- a/packages/code-du-travail-frontend/pages/contribution/[slug].tsx
+++ b/packages/code-du-travail-frontend/pages/contribution/[slug].tsx
@@ -75,6 +75,7 @@ function PageContribution(props: Props): React.ReactElement {
answers={answers}
slug={slug}
content={(content && content._source) || {}}
+ relatedItems={relatedItems}
/>
) : (
<>
diff --git a/packages/code-du-travail-frontend/src/contributions/ContributionCC.tsx b/packages/code-du-travail-frontend/src/contributions/ContributionCC.tsx
index f359ce10d5..bd32e3e085 100644
--- a/packages/code-du-travail-frontend/src/contributions/ContributionCC.tsx
+++ b/packages/code-du-travail-frontend/src/contributions/ContributionCC.tsx
@@ -106,13 +106,13 @@ const ContributionCC = ({ answers, slug, relatedItems }) => {
-
-
- Pour aller plus loins
-
-
- {relatedItems &&
- relatedItems.map((item) => {
+ {relatedItems && (
+
+
+ Pour aller plus loins
+
+
+ {relatedItems.map((item) => {
return (
{
/>
);
})}
-
-
+
+
+ )}
>
);
};
diff --git a/packages/code-du-travail-frontend/src/contributions/ContributionGeneric.tsx b/packages/code-du-travail-frontend/src/contributions/ContributionGeneric.tsx
index 109c4287e7..87cdca8e70 100644
--- a/packages/code-du-travail-frontend/src/contributions/ContributionGeneric.tsx
+++ b/packages/code-du-travail-frontend/src/contributions/ContributionGeneric.tsx
@@ -13,6 +13,7 @@ import {
ArrowLink,
Badge,
Button,
+ Grid,
Heading,
icons,
IconStripe,
@@ -37,10 +38,11 @@ import { handleTrackEvent } from "../outils/common/Agreement/tracking";
import { MatomoBaseEvent } from "../lib";
import { getCc3239Informations } from "../outils";
import { Enterprise } from "../conventions/Search/api/enterprises.service";
+import { ListLink } from "../search/SearchResults/Results";
const { DirectionRight } = icons;
-const ContributionGeneric = ({ answers, content, slug }) => {
+const ContributionGeneric = ({ answers, content, slug, relatedItems }) => {
const titleRef = useRef(null);
const onUserAction: OnUserAction = (action, extra) => {
handleTrackEvent(getTitle(), action, extra);
@@ -353,6 +355,25 @@ const ContributionGeneric = ({ answers, content, slug }) => {
+ {relatedItems && (
+
+
+ Pour aller plus loins
+
+
+ {relatedItems.map((item) => {
+ return (
+
+ );
+ })}
+
+
+ )}
>
);