Commit ff4a7580 by Arjun Jhukal

updated the menu link

parent 45ff0edc
...@@ -60,7 +60,10 @@ export default function CustomTable<TData>({ table, loading = false, ...@@ -60,7 +60,10 @@ export default function CustomTable<TData>({ table, loading = false,
</tr> </tr>
) : ( ) : (
table.getRowModel().rows.map((row) => ( table.getRowModel().rows.map((row) => (
<tr key={row.id} className=""> <tr key={row.id} className={`${row.getIsSelected()
? "bg-[#F3F8FF] hover:bg-[#E7F0FF]"
: "hover:bg-gray-50"
}`}>
{row.getVisibleCells().map((cell) => ( {row.getVisibleCells().map((cell) => (
<td key={cell.id} className="px-4 py-4 text-[12px] text-title "> <td key={cell.id} className="px-4 py-4 text-[12px] text-title ">
{flexRender( {flexRender(
...@@ -81,6 +84,7 @@ export default function CustomTable<TData>({ table, loading = false, ...@@ -81,6 +84,7 @@ export default function CustomTable<TData>({ table, loading = false,
} }
return ( return (
<div className="max-w-full overflow-x-auto">
<table className="min-w-full text-left border-separate border-spacing-y-1 user_table"> <table className="min-w-full text-left border-separate border-spacing-y-1 user_table">
<thead> <thead>
{table.getHeaderGroups().map((headerGroup) => ( {table.getHeaderGroups().map((headerGroup) => (
...@@ -137,5 +141,6 @@ export default function CustomTable<TData>({ table, loading = false, ...@@ -137,5 +141,6 @@ export default function CustomTable<TData>({ table, loading = false,
)} )}
</tbody> </tbody>
</table> </table>
</div>
) )
} }
...@@ -21,7 +21,7 @@ export default function TransactionTable({ user_id, game_id, search, setSearch } ...@@ -21,7 +21,7 @@ export default function TransactionTable({ user_id, game_id, search, setSearch }
const [sorting, setSorting] = useState<{ id: string; desc: boolean }[]>([]); const [sorting, setSorting] = useState<{ id: string; desc: boolean }[]>([]);
const [page, setPage] = useState(1); const [page, setPage] = useState(1);
const [pageSize, setPageSize] = useState(10); const [pageSize, setPageSize] = useState(10);
const [rowSelection, setRowSelection] = useState({});
const queryArgs = useMemo( const queryArgs = useMemo(
() => ({ () => ({
page, page,
...@@ -135,12 +135,15 @@ export default function TransactionTable({ user_id, game_id, search, setSearch } ...@@ -135,12 +135,15 @@ export default function TransactionTable({ user_id, game_id, search, setSearch }
data: tableData, data: tableData,
columns, columns,
state: { sorting }, state: { sorting },
// enableRowSelection: true,
onSortingChange: setSorting, onSortingChange: setSorting,
getCoreRowModel: getCoreRowModel(), getCoreRowModel: getCoreRowModel(),
getPaginationRowModel: getPaginationRowModel(), getPaginationRowModel: getPaginationRowModel(),
getSortedRowModel: getSortedRowModel(), getSortedRowModel: getSortedRowModel(),
// onRowSelectionChange: setRowSelection,
}); });
return ( return (
<div className="border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]"> <div className="border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]">
<TableHeader search={search} setSearch={setSearch && setSearch} onDownloadCSV={() => { }} /> <TableHeader search={search} setSearch={setSearch && setSearch} onDownloadCSV={() => { }} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment