import {useSortableTable} from "./useSortableTable";
import TableBody from "./table-body";
import TableHead from "./table-header";
const Table = ({ caption, data, columns }) => {
const [tableData, handleSorting] = useSortableTable(data, columns);
return (
<>
<table className="table">
<TableHead {...{ columns, handleSorting }} />
<TableBody {...{ columns, tableData }} />
</table>
</>
);
};
export default Table;