diff --git a/app/dashboard/settings/SettingsPage.tsx b/app/dashboard/settings/SettingsPage.tsx
index ac07af7..19388f6 100644
--- a/app/dashboard/settings/SettingsPage.tsx
+++ b/app/dashboard/settings/SettingsPage.tsx
@@ -54,7 +54,7 @@ export default function SettingsPage({ username, name, email }: SettingsPageProp
type="radio"
name="settings"
className="tab text-primary z-10"
- aria-label="Notification Settings"
+ aria-label="Notification Settings"
/>
diff --git a/components/cards/settings/NotificationSettings.tsx b/components/cards/settings/NotificationSettings.tsx
index 917a82b..500f016 100644
--- a/components/cards/settings/NotificationSettings.tsx
+++ b/components/cards/settings/NotificationSettings.tsx
@@ -5,9 +5,10 @@ import AddNotification from '@/components/dialogues/AddNotification';
import DeleteNotification from '@/components/dialogues/DeleteNotification';
import useNotifications from '@/hooks/useNotifications';
import { Plus, Trash2, Play, Bell } from 'lucide-react';
+import Loading from '@/components/Loading';
export const NotificationSettings = ({ onError, onSuccess }: { onError: (message: string) => void, onSuccess: (message: string) => void }) => {
- const { loadNotifications, notifications } = useNotifications();
+ const { loadNotifications, notifications, loading } = useNotifications();
const [deleteNotificationId, setDeleteNotificationId] = useState
(null);
return (
@@ -23,43 +24,47 @@ export const NotificationSettings = ({ onError, onSuccess }: { onError: (message
Add Provider
- { notifications && notifications.length > 0 ? (
-
-
-
-
-
- | # |
- Name |
- Type |
- Actions |
-
-
-
- {notifications.map((notification: any) => (
-
- | {notification.id} |
- {notification.name} |
- {notification.type} |
-
-
-
-
-
- |
+ {loading ? (
+
+
+
+ ) : notifications && notifications.length > 0 ? (
+
+
+
+
+
+ | # |
+ Name |
+ Type |
+ Actions |
- ))}
-
-
+
+
+ {notifications.map((notification: any) => (
+
+ | {notification.id} |
+ {notification.name} |
+ {notification.type} |
+
+
+
+
+
+ |
+
+ ))}
+
+
) : (
-
-
-
-
No notification providers have been added yet.
+
+
+
+
No notification providers have been added yet.
)}