(null);
- if (!data) {
+ if (!competenceData) {
return ❌ Compétence introuvable.
;
}
- const { name, content, picture } = data;
+ const { name, content, picture } = competenceData;
const images = picture?.map((img: any) => ({
url: `http://localhost:1337${img?.formats?.large?.url || img?.url}`,
diff --git a/app/components/ContentSectionCompetencesContainer.tsx b/app/components/ContentSectionCompetencesContainer.tsx
new file mode 100644
index 0000000..2f4efac
--- /dev/null
+++ b/app/components/ContentSectionCompetencesContainer.tsx
@@ -0,0 +1,23 @@
+import { fetchDataCompetences, fetchDataGlossaire } from "../utils/fetchDataCompetences";
+import ContentSectionCompetences from "./ContentSectionCompetences";
+
+interface ContentSectionProps {
+ collection: string;
+ slug: string;
+ titleClass?: string;
+ contentClass?: string;
+}
+
+export default async function ContentSectionCompetencesContainer({ collection, slug, titleClass, contentClass }: ContentSectionProps) {
+ const competenceData = await fetchDataCompetences(collection, slug);
+ const glossaireData = await fetchDataGlossaire();
+
+ return (
+
+ );
+}