first commit
This commit is contained in:
parent
b216a187bd
commit
f73c77f548
119 changed files with 4504 additions and 4829 deletions
35
frontend/app/components/Services.tsx
Normal file
35
frontend/app/components/Services.tsx
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
async function GetServices() {
|
||||
const res = await fetch(`${process.env.BACKEND_URL}/services`, {
|
||||
cache: process.env.CACHE
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error("Erreur lors de la lecture des services du CV.")
|
||||
}
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export default async function Services() {
|
||||
const services = await GetServices();
|
||||
|
||||
return (
|
||||
<section id="services" className="section">
|
||||
<div className="container">
|
||||
<h2 className="section-title">Services proposés</h2>
|
||||
<ul className="grid-3">
|
||||
{services.map((service: any) => (
|
||||
<li key={service.id} className="service-card card feature">
|
||||
<span className="feature__icon" aria-hidden="true" />
|
||||
<div>
|
||||
<h3 className="feature__title">{service.name}</h3>
|
||||
{"description" in service && service.description ? (
|
||||
<p className="u-muted">{service.description}</p>
|
||||
) : null}
|
||||
</div>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue