test(notification): added framework for managment tab
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user