import Link from "next/link"; // Fonction pour récupérer toutes les compétences depuis l'API Strapi async function getAllCompetences() { try { const response = await fetch("http://localhost:1337/api/competences?populate=*"); if (!response.ok) { throw new Error("Failed to fetch competences"); } const competences = await response.json(); return competences.data; } catch (error) { console.error("Error fetching competences:", error); return []; } } // Composant principal de la page des compétences export default async function Page() { const competences = await getAllCompetences(); return (
{competence.name}
{competence.description}