mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-23 18:36:16 +00:00
Notification Settings Loading
This commit is contained in:
parent
cfc9bc5951
commit
2203daa2c3
@ -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<number | null>(null);
|
||||
|
||||
return (
|
||||
@ -23,7 +24,11 @@ export const NotificationSettings = ({ onError, onSuccess }: { onError: (message
|
||||
Add Provider
|
||||
</button>
|
||||
</div>
|
||||
{ notifications && notifications.length > 0 ? (
|
||||
{loading ? (
|
||||
<div className="flex justify-center items-center h-64 w-full">
|
||||
<Loading />
|
||||
</div>
|
||||
) : notifications && notifications.length > 0 ? (
|
||||
<div className="rounded-xl overflow-hidden border border-base-200 mt-4">
|
||||
<div className='overflow-x-auto'>
|
||||
<table className='table table-zebra table-pin-cols'>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user