import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { getPortfolioSummary } from '@/actions/portfolio'; import { formatQuantity, formatAmount } from '@/lib/formatters'; import AllocationChart from '@/components/dashboard/allocation-chart'; import { SyncButton } from '@/components/assets/sync-button'; import Big from 'big.js'; export default async function DashboardPage() { const { positions, totalCnyValue, chartData, totalPnlCny, unrealizedPnlCny, marketAllocation } = await getPortfolioSummary(); const formattedTotal = formatAmount(totalCnyValue); const formattedTotalPnl = formatAmount(totalPnlCny); const formattedUnrealized = formatAmount(unrealizedPnlCny); const totalPnlIsPositive = new Big(totalPnlCny).gte(0); const unrealizedIsPositive = new Big(unrealizedPnlCny).gte(0); return (
您的跨界记账中枢。
暂无持仓,请先添加资产和交易记录。