first commit
This commit is contained in:
parent
b216a187bd
commit
f73c77f548
119 changed files with 4504 additions and 4829 deletions
31
frontend/app/projects/page.tsx
Normal file
31
frontend/app/projects/page.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
async function getProjects() {
|
||||
const res = await fetch("http://127.0.0.1:5000/api/projects/", {
|
||||
cache: "no-store",
|
||||
});
|
||||
|
||||
if(!res.ok){
|
||||
throw new Error("Erreur lors de la récupération des projets depuis l'API");
|
||||
}
|
||||
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export default async function ProjectsPage() {
|
||||
const projects = await getProjects();
|
||||
|
||||
return(
|
||||
<section id="projets" className="section">
|
||||
<div className="container">
|
||||
<h2 className="section-title">Mes projets</h2>
|
||||
<ul className="projects-list">
|
||||
{projects.map((p: any) => (
|
||||
<li key={p.id}>
|
||||
<h3>{p.name}</h3>
|
||||
<p>{p.description}</p>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue