import { useColumns } from "./useTableColumns";
import React from "react";
import { useGetAllPayment } from "../../api/payment";
import DataTable from "../../Layout/Dashboard/Table/DataTable";
import { useGetAllUnit } from "../../api/unit";
import { useParams } from "react-router-dom";
import { ParamsEnum } from "../../enums/params";

const App: React.FC = () => {
  const { subject_id } = useParams<ParamsEnum>();
  const response = useGetAllUnit({ subject_id: subject_id, pagination: true });
  console.log(response?.data?.data, "response?.data");

  return <DataTable response={response} useColumns={useColumns} />;
};

export default App;
