export default async function getUserNotifications() {
    try {
        const response = await fetch(
            'http://localhost:80/api/users/1/notifications',
            {
                method: 'GET',
                credentials: 'include',
                headers: {
                    'Content-Type': 'application/json',
                    'Accept': 'application/json'
                }
            }
        );
        const data = await response.json();
        return data.data;

    } catch (err) {
        console.error("Erreur :", err);
        return null;
    }
}
