/* Copyright (C) 2025 QuantumNous This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ import React, { useContext } from 'react'; import { UserContext } from '../../context/User'; import { useUserMessageUnreadCount } from '../../hooks/common/useUserMessageUnreadCount'; import { useDashboardData } from '../../hooks/dashboard/useDashboardData'; import TopBar from './TopBar'; import Hero from './Hero'; import BentoStats from './BentoStats'; import BentoTrend from './BentoTrend'; import MonthlyForecast from './MonthlyForecast'; import RecentActivity from './RecentActivity'; const Dashboard = () => { const [userState] = useContext(UserContext); const user = userState?.user; const dashboard = useDashboardData(userState); const { unreadCount } = useUserMessageUnreadCount(user); return (
{}} onRefresh={dashboard.refresh} loading={dashboard.loading} user={user} unreadCount={unreadCount} />
{/* 第一行:5 个核心指标卡 */}
{/* 第二行:七日用量趋势 + 本月账单预测 */}
{/* 第三行:最近调用 */}
TokenFactory · 2026
); }; export default Dashboard;