import React from 'react';
import './WelcomeSections.css';
import { useAuth } from '../context/AuthContext';

export default function WelcomeSection() {
    const { user } = useAuth();

    
    const displayPrenom = user ? user.prenom : "Cher"; 
    const displayNom = user ? user.nom : "Utilisateur"; 

    return (
        <div className="welcome-section">
            <p className="welcome-greeting">Bonjour {displayPrenom} {displayNom}</p> 
            <p className="welcome-message">Bienvenue sur votre espace de gestion de congés</p>
        </div>
    );
}