import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { getPortfolioPositions } from '@/actions/portfolio'; import { formatQuantity } from '@/lib/formatters'; import AllocationChart from '@/components/dashboard/allocation-chart'; const CHART_COLORS = [ '#3b82f6', '#8b5cf6', '#10b981', '#f59e0b', '#ef4444', '#06b6d4', ]; export default async function DashboardPage() { const positions = await getPortfolioPositions(); const chartData = positions.map((pos, index) => ({ name: pos.symbol, value: Number(pos.quantity), fill: CHART_COLORS[index % CHART_COLORS.length], })); return (
您的跨界记账中枢。
暂无持仓,请先添加资产和交易记录。