diff --git a/web/src/routes/dashboard/notifications/+page.svelte b/web/src/routes/dashboard/notifications/+page.svelte index 47f728e..c9574a7 100644 --- a/web/src/routes/dashboard/notifications/+page.svelte +++ b/web/src/routes/dashboard/notifications/+page.svelte @@ -2,10 +2,9 @@ import { onMount } from 'svelte'; import { env } from '$env/dynamic/public'; import { Button } from '$lib/components/ui/button/index.js'; - import {Separator} from "$lib/components/ui/separator"; + import { Separator } from '$lib/components/ui/separator'; import * as Sidebar from '$lib/components/ui/sidebar/index.js'; import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js'; - import { Check } from 'lucide-svelte'; const apiUrl = env.PUBLIC_API_URL; @@ -103,26 +102,6 @@ } } - async function deleteNotification(notificationId: string) { - try { - const response = await fetch(`${apiUrl}/notification/${notificationId}`, { - method: 'DELETE', - headers: { - 'Content-Type': 'application/json' - }, - credentials: 'include' - }); - - if (response.ok) { - // Remove from both lists - unreadNotifications = unreadNotifications.filter((n) => n.id !== notificationId); - readNotifications = readNotifications.filter((n) => n.id !== notificationId); - } - } catch (error) { - console.error('Failed to delete notification:', error); - } - } - async function markAllAsRead() { if (unreadNotifications.length === 0) return; @@ -207,11 +186,7 @@

Notifications

{#if unreadNotifications.length > 0} -