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

const App: React.FC = () => {
  const { unit_id } = useParams<ParamsEnum>();
  const response = useGetAllLesson({ unit_id: unit_id, pagination: true });

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

export default App;
