diff --git a/src/components/ui/data-table/data-table.tsx b/src/components/ui/data-table/data-table.tsx index 1a2e766..5cc26af 100644 --- a/src/components/ui/data-table/data-table.tsx +++ b/src/components/ui/data-table/data-table.tsx @@ -9,6 +9,8 @@ interface DataTableProps { } export function DataTable({ table, columnsLength }: DataTableProps) { + const tableRows = table.getRowModel().rows; + return (
@@ -30,8 +32,8 @@ export function DataTable({ table, columnsLength }: DataTableProps ))} - {table.getRowModel().rows?.length ? ( - table.getRowModel().rows.map((row) => ( + {tableRows?.length ? ( + tableRows.map((row) => ( {row.getVisibleCells().map((cell) => (