export default async function getUserNotifications() {
    try {
        const response = await fetch(
            `${import.meta.env.VITE_API_URL}/api/users/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;
    }
}
