import { useGetAllSubject } from "../../../api/subject";
import { useParams } from "react-router-dom";
import DataTable from "../../../Layout/Dashboard/Table/DataTable";
import { useColumns } from "./useTableColumns";
import { ParamsEnum } from "../../../enums/params";

const TablePage: React.FC = () => {
  const { course_id } = useParams<ParamsEnum>();
  const response = useGetAllSubject({ course_id: course_id, pagination: true });

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

export default TablePage;
