mirror of
https://github.com/multipleof4/KalBot.git
synced 2026-03-17 05:51:02 +00:00
Feat: Add nav link to live dashboard
This commit is contained in:
@@ -86,6 +86,9 @@ export default function PaperDashboard() {
|
||||
<span className="text-xs bg-amber-100 text-amber-700 px-2 py-0.5 rounded-full font-medium">PAPER</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
<a href="/dash" className="text-[10px] px-2 py-1 rounded bg-gray-900 text-green-400 border border-gray-700 hover:bg-gray-800 transition-colors font-bold">
|
||||
💰 Live
|
||||
</a>
|
||||
<button
|
||||
onClick={handleReset}
|
||||
disabled={resetting}
|
||||
@@ -298,7 +301,6 @@ function AllStrategiesOverview({ paperByStrategy, strategies }) {
|
||||
}));
|
||||
|
||||
if (!entries.length) return null;
|
||||
|
||||
entries.sort((a, b) => b.stats.totalPnL - a.stats.totalPnL);
|
||||
|
||||
return (
|
||||
@@ -339,10 +341,8 @@ function StatBox({ label, value, color }) {
|
||||
}
|
||||
|
||||
function TradeRow({ trade, isOpen }) {
|
||||
// Fix: Check side vs result for actual win condition, not strictly PNL > 0
|
||||
const won = trade.result && trade.side.toLowerCase() === trade.result.toLowerCase();
|
||||
const isNeutral = trade.result === 'cancelled' || trade.result === 'expired';
|
||||
|
||||
const pnlColor = trade.pnl == null ? 'text-gray-400' : trade.pnl > 0 ? 'text-green-600' : trade.pnl < 0 ? 'text-red-600' : 'text-gray-600';
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user