updates to tables and expanded them to full
This commit is contained in:
parent
e8fbe76f2e
commit
065d3943f6
6 changed files with 118 additions and 198 deletions
|
|
@ -2,15 +2,19 @@ import { DashboardStats, DashboardActivity, PortfolioTable } from './components'
|
|||
|
||||
export function DashboardPage() {
|
||||
return (
|
||||
<>
|
||||
<h1 className="text-lg font-bold text-text-primary mb-2">Welcome to Stock Bot Dashboard</h1>
|
||||
<p className="text-text-secondary mb-6 text-sm">
|
||||
Monitor your trading performance, manage portfolios, and analyze market data.
|
||||
</p>
|
||||
|
||||
<DashboardStats />
|
||||
<DashboardActivity />
|
||||
<PortfolioTable />
|
||||
</>
|
||||
<div className="flex flex-col h-full space-y-6">
|
||||
<div className="flex-shrink-0">
|
||||
<h1 className="text-lg font-bold text-text-primary mb-2">Welcome to Stock Bot Dashboard</h1>
|
||||
<p className="text-text-secondary mb-6 text-sm">
|
||||
Monitor your trading performance, manage portfolios, and analyze market data.
|
||||
</p>
|
||||
<DashboardStats />
|
||||
<DashboardActivity />
|
||||
</div>
|
||||
|
||||
<div className="flex-1 min-h-0">
|
||||
<PortfolioTable />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -632,20 +632,11 @@ export function PortfolioTable() {
|
|||
];
|
||||
|
||||
return (
|
||||
<div className="mt-6">
|
||||
<h3 className="text-lg font-bold text-text-primary mb-2">Portfolio Holdings</h3>
|
||||
<p className="text-sm text-text-secondary mb-4">
|
||||
Performance test: 100,000 rows × {columns.length} columns ={' '}
|
||||
{(100000 * columns.length).toLocaleString()} cells
|
||||
</p>
|
||||
<div className="flex-grow w-full border border-border rounded-lg overflow-hidden">
|
||||
<DataTable
|
||||
data={data}
|
||||
columns={columns}
|
||||
onRowClick={row => console.log('Clicked:', row.symbol)}
|
||||
className="w-full h-full"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<DataTable
|
||||
data={data}
|
||||
columns={columns}
|
||||
onRowClick={row => console.log('Clicked:', row.symbol)}
|
||||
className="border border-border rounded-lg"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ export function ExchangesPage() {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex flex-col h-full space-y-6">
|
||||
<div className="flex items-center justify-between flex-shrink-0">
|
||||
<div>
|
||||
<h1 className="text-lg font-bold text-text-primary mb-2">Exchange Management</h1>
|
||||
<p className="text-text-secondary text-sm">
|
||||
|
|
@ -68,7 +68,7 @@ export function ExchangesPage() {
|
|||
</div>
|
||||
|
||||
{syncing && (
|
||||
<div className="bg-primary-50 border border-primary-200 rounded-lg p-4">
|
||||
<div className="bg-primary-50 border border-primary-200 rounded-lg p-4 flex-shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<ArrowPathIcon className="h-4 w-4 text-primary-500 animate-spin" />
|
||||
<span className="text-primary-700 text-sm">
|
||||
|
|
@ -110,7 +110,9 @@ export function ExchangesPage() {
|
|||
</div>
|
||||
)}
|
||||
|
||||
<ExchangesTable />
|
||||
<div className="flex-1 min-h-0">
|
||||
<ExchangesTable />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,17 +252,7 @@ export function ExchangesTable() {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h2 className="text-lg font-bold text-text-primary">Exchanges Management</h2>
|
||||
<p className="text-sm text-text-secondary">
|
||||
Manage exchange configurations and source mappings
|
||||
</p>
|
||||
</div>
|
||||
<div className="text-sm text-text-muted">{exchanges?.length || 0} exchanges loaded</div>
|
||||
</div>
|
||||
|
||||
<>
|
||||
<DataTable
|
||||
data={exchanges || []}
|
||||
columns={columns}
|
||||
|
|
@ -270,11 +260,6 @@ export function ExchangesTable() {
|
|||
className="rounded-lg border border-border"
|
||||
/>
|
||||
|
||||
<div className="mt-2 text-xs text-text-muted">
|
||||
Debug: Data length: {exchanges?.length || 0}, Loading: {loading.toString()}, Error:{' '}
|
||||
{error || 'none'}
|
||||
</div>
|
||||
|
||||
{addSourceDialog && (
|
||||
<AddSourceDialog
|
||||
isOpen={true}
|
||||
|
|
@ -293,6 +278,6 @@ export function ExchangesTable() {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue