|
|
@@ -2,13 +2,12 @@ import { useNavigate } from 'react-router';
|
|
|
import { Users, Bell, Eye, TrendingUp, TrendingDown, Activity } from 'lucide-react';
|
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/client/components/ui/card';
|
|
|
import { Progress } from '@/client/components/ui/progress';
|
|
|
-import { useToast } from '@/client/hooks/use-toast';
|
|
|
+import { toast } from 'sonner';
|
|
|
import { QUICK_ACTION_ROUTES } from '../constants/routes';
|
|
|
|
|
|
// 仪表盘页面
|
|
|
export const DashboardPage = () => {
|
|
|
const navigate = useNavigate();
|
|
|
- const { toast } = useToast();
|
|
|
const stats = [
|
|
|
{
|
|
|
title: '活跃用户',
|
|
|
@@ -103,17 +102,13 @@ export const DashboardPage = () => {
|
|
|
navigate(route);
|
|
|
} else {
|
|
|
console.warn(`[Dashboard] 未知的快捷操作: ${action}`);
|
|
|
- toast({
|
|
|
- variant: 'destructive',
|
|
|
- title: '未知操作',
|
|
|
+ toast.error('未知操作', {
|
|
|
description: `未知的快捷操作: ${action}`,
|
|
|
});
|
|
|
}
|
|
|
} catch (error) {
|
|
|
console.error('[Dashboard] 快捷操作导航失败:', error);
|
|
|
- toast({
|
|
|
- variant: 'destructive',
|
|
|
- title: '导航失败',
|
|
|
+ toast.error('导航失败', {
|
|
|
description: `无法导航到目标页面: ${action}`,
|
|
|
});
|
|
|
}
|