feat(ui): 引入 sonner 消息反馈系统,并在首页部署全局行情同步按钮
This commit is contained in:
@@ -2,6 +2,7 @@ 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';
|
||||
|
||||
const CHART_COLORS = [
|
||||
@@ -33,6 +34,10 @@ export default async function DashboardPage() {
|
||||
</div>
|
||||
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
|
||||
<CardTitle className="text-sm font-medium">总资产概览</CardTitle>
|
||||
<SyncButton />
|
||||
</CardHeader>
|
||||
<CardContent className="pt-6 pb-6">
|
||||
<div className="flex items-center gap-3">
|
||||
<span className="text-2xl font-semibold text-muted-foreground">
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import { Toaster } from "@/components/ui/sonner";
|
||||
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans",
|
||||
@@ -29,6 +30,7 @@ export default function RootLayout({
|
||||
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
<Toaster />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user