import { Table } from "@mantine/core";
import { Table as TanstackTable } from "@tanstack/react-table";

import { Skeleton } from "../skeleton";

export function DataTableSkeleton({ table }: { table: TanstackTable<any> }) {
  return Array.from({ length: 10 }).map((_, i) => (
    <Table.Tr key={i}>
      {table.getAllColumns().map((column) => (
        <Table.Td key={column.id}>
          <Skeleton className="h-8" />
        </Table.Td>
      ))}
    </Table.Tr>
  ));
}
