update fetch url to match new api prefix
This commit is contained in:
@@ -14,7 +14,7 @@ function Experiences() {
|
|||||||
throw new Error(`Erreur HTTP: ${response.status}`);
|
throw new Error(`Erreur HTTP: ${response.status}`);
|
||||||
}
|
}
|
||||||
let data = await response.json();
|
let data = await response.json();
|
||||||
setExperiences(data.data);
|
setExperiences(data);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err.message);
|
setError(err.message);
|
||||||
}
|
}
|
||||||
@@ -30,13 +30,9 @@ function Experiences() {
|
|||||||
<section id="experiences-section">
|
<section id="experiences-section">
|
||||||
<h1 className="section-title">Experiences</h1>
|
<h1 className="section-title">Experiences</h1>
|
||||||
<div className="experiences-container">
|
<div className="experiences-container">
|
||||||
{experiences ? (
|
{experiences.map((exp) => (
|
||||||
experiences.map((exp) => (
|
|
||||||
<SingleExperience experience={exp}/>
|
<SingleExperience experience={exp}/>
|
||||||
))
|
))}
|
||||||
) : (
|
|
||||||
<p>Chargement...</p>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user