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>
            <NotifyTable columns={notifyColumns} data={data} />
        </div>
    );
}
