import TableBody from "./TableBody"
import TableHead from "./TableHead"


interface Props {
  columns:string[]
  endpoint: string
}

const Table = ({ columns, endpoint }:Props) => {
  

  return (
    <div className="overflow-x-auto">
      <table className="table w-full table-compact">
        <TableHead columns={columns} />
        <TableBody columns={columns} endpoint={endpoint} />
      </table>
    </div>

  )
}

export default Table

