diff --git a/apps/web/src/components/ui/DataTable/DataTable.tsx b/apps/web/src/components/ui/DataTable/DataTable.tsx index 7e9e164..288f3a2 100644 --- a/apps/web/src/components/ui/DataTable/DataTable.tsx +++ b/apps/web/src/components/ui/DataTable/DataTable.tsx @@ -4,7 +4,6 @@ import { ColumnDef, flexRender, getCoreRowModel, - getFilteredRowModel, getSortedRowModel, SortingState, useReactTable, @@ -24,28 +23,23 @@ interface DataTableProps { export function DataTable({ data, columns, - height = 500, + height, loading = false, onRowClick, className = '', }: DataTableProps) { const [sorting, setSorting] = useState([]); - const [globalFilter, setGlobalFilter] = useState(''); const table = useReactTable({ data, columns, state: { sorting, - globalFilter, }, onSortingChange: setSorting, - onGlobalFilterChange: setGlobalFilter, getCoreRowModel: getCoreRowModel(), getSortedRowModel: getSortedRowModel(), - getFilteredRowModel: getFilteredRowModel(), enableSorting: true, - enableGlobalFilter: true, }); const { rows } = table.getRowModel(); @@ -59,109 +53,87 @@ export function DataTable({ } return ( -
- {/* Search */} -
- setGlobalFilter(e.target.value)} - placeholder="Search..." - className="w-full max-w-md bg-surface border border-border rounded px-3 py-2 text-sm text-text-primary placeholder-text-muted focus:ring-1 focus:ring-primary-500 focus:border-primary-500" - /> -
+ ( + + ), + TableRow: props => { + const index = props['data-index'] as number; + const row = rows[index]; - {/* Virtualized Table */} - ( -
- ), - TableRow: props => { - const index = props['data-index'] as number; - const row = rows[index]; - - return ( - onRowClick?.(row.original)} - > - {row.getVisibleCells().map(cell => ( - - ))} - - ); - }, - }} - fixedHeaderContent={() => - table.getHeaderGroups().map(headerGroup => ( - - {headerGroup.headers.map(header => ( - ))} - )) - } - /> - - {/* Footer */} -
- - Showing {rows.length} of {data.length} rows - - {globalFilter && Filtered by: "{globalFilter}"} -
- + ); + }, + }} + fixedHeaderContent={() => + table.getHeaderGroups().map(headerGroup => ( + + {headerGroup.headers.map(header => ( + + ))} + + )) + } + /> ); } diff --git a/apps/web/src/features/dashboard/DashboardPage.tsx b/apps/web/src/features/dashboard/DashboardPage.tsx index 9c522c6..cdd412f 100644 --- a/apps/web/src/features/dashboard/DashboardPage.tsx +++ b/apps/web/src/features/dashboard/DashboardPage.tsx @@ -2,15 +2,19 @@ import { DashboardStats, DashboardActivity, PortfolioTable } from './components' export function DashboardPage() { return ( - <> -

Welcome to Stock Bot Dashboard

-

- Monitor your trading performance, manage portfolios, and analyze market data. -

- - - - - +
+
+

Welcome to Stock Bot Dashboard

+

+ Monitor your trading performance, manage portfolios, and analyze market data. +

+ + +
+ +
+ +
+
); } diff --git a/apps/web/src/features/dashboard/components/PortfolioTable.tsx b/apps/web/src/features/dashboard/components/PortfolioTable.tsx index 4251de8..39023c3 100644 --- a/apps/web/src/features/dashboard/components/PortfolioTable.tsx +++ b/apps/web/src/features/dashboard/components/PortfolioTable.tsx @@ -632,20 +632,11 @@ export function PortfolioTable() { ]; return ( -
-

Portfolio Holdings

-

- Performance test: 100,000 rows × {columns.length} columns ={' '} - {(100000 * columns.length).toLocaleString()} cells -

-
- console.log('Clicked:', row.symbol)} - className="w-full h-full" - /> -
-
+ console.log('Clicked:', row.symbol)} + className="border border-border rounded-lg" + /> ); } diff --git a/apps/web/src/features/exchanges/ExchangesPage.tsx b/apps/web/src/features/exchanges/ExchangesPage.tsx index 3845940..4dfd747 100644 --- a/apps/web/src/features/exchanges/ExchangesPage.tsx +++ b/apps/web/src/features/exchanges/ExchangesPage.tsx @@ -49,8 +49,8 @@ export function ExchangesPage() { }; return ( -
-
+
+

Exchange Management

@@ -68,7 +68,7 @@ export function ExchangesPage() {

{syncing && ( -
+
@@ -110,7 +110,9 @@ export function ExchangesPage() {
)} - +
+ +
); } diff --git a/apps/web/src/features/exchanges/components/ExchangesTable.tsx b/apps/web/src/features/exchanges/components/ExchangesTable.tsx index 9fdab5f..0168a2f 100644 --- a/apps/web/src/features/exchanges/components/ExchangesTable.tsx +++ b/apps/web/src/features/exchanges/components/ExchangesTable.tsx @@ -252,17 +252,7 @@ export function ExchangesTable() { } return ( -
-
-
-

Exchanges Management

-

- Manage exchange configurations and source mappings -

-
-
{exchanges?.length || 0} exchanges loaded
-
- + <> -
- Debug: Data length: {exchanges?.length || 0}, Loading: {loading.toString()}, Error:{' '} - {error || 'none'} -
- {addSourceDialog && ( )} -
+ ); } diff --git a/apps/web/src/index.css b/apps/web/src/index.css index f0d68ac..dbbab10 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -50,73 +50,39 @@ } @layer components { - /* Global sleek dark-themed scrollbars for all elements */ + /* Global dark-themed scrollbars with better contrast */ * { scrollbar-width: thin; - scrollbar-color: rgb(74 74 74) rgb(26 26 26); + scrollbar-color: rgb(115 115 115) rgb(40 40 40); } *::-webkit-scrollbar { - width: 8px; - height: 8px; + width: 10px; + height: 10px; } *::-webkit-scrollbar-track { - background: rgb(26 26 26); - border-radius: 4px; + background: rgb(40 40 40); + border-radius: 5px; } *::-webkit-scrollbar-thumb { - background-color: rgb(74 74 74); - border-radius: 4px; - border: 1px solid rgb(42 42 42); + background-color: rgb(115 115 115); + border-radius: 5px; + border: 2px solid rgb(40 40 40); transition: background-color 0.2s ease; } *::-webkit-scrollbar-thumb:hover { - background-color: rgb(90 90 90); + background-color: rgb(140 140 140); } *::-webkit-scrollbar-thumb:active { - background-color: rgb(106 106 106); + background-color: rgb(160 160 160); } *::-webkit-scrollbar-corner { - background: rgb(26 26 26); - } - /* Global scrollbar for the entire app */ - * { - scrollbar-width: thin; - scrollbar-color: rgb(26 26 26) transparent; - } - - *::-webkit-scrollbar { - width: 8px; - height: 8px; - } - - *::-webkit-scrollbar-track { - background: rgb(0 0 0); - border-radius: 4px; - } - - *::-webkit-scrollbar-thumb { - background-color: rgb(26 26 26); - border-radius: 4px; - border: 1px solid rgb(0 0 0); - transition: background-color 0.2s ease; - } - - *::-webkit-scrollbar-thumb:hover { - background-color: rgb(42 42 42); - } - - *::-webkit-scrollbar-thumb:active { - background-color: rgb(60 60 60); - } - - *::-webkit-scrollbar-corner { - background: rgb(0 0 0); + background: rgb(40 40 40); } /* Trading specific styles */
-
- {flexRender(cell.column.columnDef.cell, cell.getContext())} -
-
onRowClick?.(row.original)} + > + {row.getVisibleCells().map(cell => ( + - {header.isPlaceholder ? null : ( -
- - {flexRender(header.column.columnDef.header, header.getContext())} - - {header.column.getCanSort() && ( -
- {header.column.getIsSorted() === 'asc' ? ( - - ) : header.column.getIsSorted() === 'desc' ? ( - - ) : ( -
- )} -
- )} -
- )} - +
+ {flexRender(cell.column.columnDef.cell, cell.getContext())} +
+
+ {header.isPlaceholder ? null : ( +
+ + {flexRender(header.column.columnDef.header, header.getContext())} + + {header.column.getCanSort() && ( +
+ {header.column.getIsSorted() === 'asc' ? ( + + ) : header.column.getIsSorted() === 'desc' ? ( + + ) : ( +
+ )} +
+ )} +
+ )} +