update notification routes call

This commit is contained in:
2025-12-17 17:22:10 +01:00
parent 0aaafed26a
commit 21259f2838
3 changed files with 6 additions and 9 deletions
+2 -5
View File
@@ -2,7 +2,6 @@ import styles from "./Header.module.css"
import { Link, NavLink } from "react-router";
import { useEffect, useRef, useState } from "react";
import getUserNotifications from "../../utils/notifications/getUserNotifications.js";
import getUser from "../../utils/getUser.js";
import deleteNotificationUser from "../../utils/notifications/deleteNotificationUser.js";
function Header() {
@@ -16,8 +15,7 @@ function Header() {
useEffect(() => {
async function loadNotifications() {
const user = await getUser();
const notifData = await getUserNotifications(user.id);
const notifData = await getUserNotifications();
setNotifications(notifData || []);
}
@@ -44,8 +42,7 @@ function Header() {
async function deleteNotification(notificationId) {
try {
const user = await getUser();
const result = await deleteNotificationUser(user.id, notificationId);
const result = await deleteNotificationUser(notificationId);
console.log(result);