From 155a0af8839f49b1aff61111bbc0a7ebbba626fa Mon Sep 17 00:00:00 2001 From: headlessdev Date: Thu, 17 Apr 2025 15:39:21 +0200 Subject: [PATCH] Type Error Fix getNotifications --- app/dashboard/settings/Settings.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/dashboard/settings/Settings.tsx b/app/dashboard/settings/Settings.tsx index 76cbdfd..4fe2634 100644 --- a/app/dashboard/settings/Settings.tsx +++ b/app/dashboard/settings/Settings.tsx @@ -49,6 +49,10 @@ import { import { Label } from "@/components/ui/label"; import { Checkbox } from "@/components/ui/checkbox"; +interface NotificationsResponse { + notifications: any[]; +} + export default function Settings() { const { theme, setTheme } = useTheme(); @@ -196,9 +200,8 @@ export default function Settings() { const getNotifications = async () => { try { - const response = await axios.post('/api/notifications/get', {}); + const response = await axios.post('/api/notifications/get', {}); if (response.status === 200 && response.data) { - console.log(response.data.notifications) setNotifications(response.data.notifications); } }