async function GetAboutDatas(){
    const res = await fetch(`${process.env.BACKEND_URL}/cv/about`, {
        cache: process.env.CACHE
    });

    if(!res.ok){
        throw new Error("Erreur lors de la lecture des données de contact.")
    }
    return res.json();
}

export default async function About(){
    const about_text = await GetAboutDatas();

    return (
        <section className="dev-hero">
            <div className="container container--narrow">
                <span className="eyebrow">Développeur web</span>
                <h1 className="headline headline--code">Anthony Violet</h1>
                <p className="subheadline">{about_text}</p>
            </div>
        </section>
    );
}