diff --git a/src/modules/dashboard/components/DashboardTable.tsx b/src/modules/dashboard/components/DashboardTable.tsx index 2fdcb76..1f7bc15 100644 --- a/src/modules/dashboard/components/DashboardTable.tsx +++ b/src/modules/dashboard/components/DashboardTable.tsx @@ -1,68 +1,70 @@ "use client"; import React from "react"; -import { Table, Center } from "@mantine/core" +import { Table, Center, ScrollArea } from "@mantine/core"; import { Table as ReactTable, flexRender } from "@tanstack/react-table"; interface Props { - table: ReactTable + table: ReactTable; } -export default function DashboardTable({table}: Props) { +export default function DashboardTable({ table }: Props) { return ( - - {/* Thead */} - - {table.getHeaderGroups().map((headerGroup) => ( - - {headerGroup.headers.map((header) => ( - - {header.isPlaceholder - ? null - : flexRender( - header.column.columnDef.header, - header.getContext() - )} - - ))} - - ))} - - - {/* Tbody */} - - {table.getRowModel().rows.length > 0 ? ( - table.getRowModel().rows.map((row) => ( - - {row.getVisibleCells().map((cell) => ( - +
+ {/* Thead */} + + {table.getHeaderGroups().map((headerGroup) => ( + + {headerGroup.headers.map((header) => ( + - {flexRender( - cell.column.columnDef.cell, - cell.getContext() - )} - + {header.isPlaceholder + ? null + : flexRender( + header.column.columnDef.header, + header.getContext() + )} + ))} - )) - ) : ( - - -
- No Data -
-
-
- )} - -
+ ))} + + + {/* Tbody */} + + {table.getRowModel().rows.length > 0 ? ( + table.getRowModel().rows.map((row) => ( + + {row.getVisibleCells().map((cell) => ( + + {flexRender( + cell.column.columnDef.cell, + cell.getContext() + )} + + ))} + + )) + ) : ( + + +
- No Data -
+
+
+ )} +
+ + ); }