diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index 59a515e..019e1f1 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useEffect, useTransition } from 'react'; +import React, { useState, useEffect, useTransition } from 'react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Table, @@ -214,8 +214,8 @@ export default function DashboardPage() { const isExpanded = !!expandedIds[pos.assetId]; return ( - <> - toggleExpand(pos.assetId)}> + + toggleExpand(pos.assetId)}>
{pos.name || pos.symbol} @@ -361,7 +361,7 @@ export default function DashboardPage() { )} - + ); })} diff --git a/src/actions/portfolio.ts b/src/actions/portfolio.ts index 118a5e2..722ce91 100644 --- a/src/actions/portfolio.ts +++ b/src/actions/portfolio.ts @@ -432,7 +432,7 @@ export async function getPortfolioSummary() { const chartData = positions.map((pos, index) => ({ name: pos.symbol, - value: new Big(pos.cnyValue), + value: new Big(pos.cnyValue).toNumber(), fill: [ '#3b82f6', '#8b5cf6',