test(notification): added framework for managment tab

This commit is contained in:
2025-04-14 12:27:45 -05:00
parent 17773e9a23
commit ae7ea2bb90
6 changed files with 143 additions and 16 deletions

View File

@@ -1,8 +1,22 @@
import { getnotifications } from "@/utils/querys/admin/notifications";
import { notifyColumns } from "@/utils/tableData/notifications/notifyColumns";
import { NotifyTable } from "@/utils/tableData/notifications/notifyData";
import { useQuery } from "@tanstack/react-query";
export default function NotificationMGT() {
const { data, isError, isLoading } = useQuery(getnotifications());
if (isLoading) return <div>Loading adjustmnet data...</div>;
if (isError) {
return (
<div>
<p>There was an error getting the adjustments.</p>
</div>
);
}
return (
<div>
Manage all notifications from here instad of going to the db,
locking some items that are auto updated on server restarts
<NotifyTable columns={notifyColumns} data={data} />
</div>
);
}