Browse Source

fix: resolve naming conflict between Activity type and icon

master
dark 1 month ago
parent
commit
c44c0a86c5
  1. 6
      frontend/react-shadcn/pc/src/pages/DashboardPage.tsx

6
frontend/react-shadcn/pc/src/pages/DashboardPage.tsx

@ -1,5 +1,5 @@
import { useState, useEffect } from 'react' import { useState, useEffect } from 'react'
import { Users, Zap, Activity, Database, Loader2 } from 'lucide-react' import { Users, Zap, Activity as ActivityIcon, Database, Loader2 } from 'lucide-react'
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card' import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/Card'
import { apiClient } from '@/services/api' import { apiClient } from '@/services/api'
import type { DashboardStats, Activity } from '@/types' import type { DashboardStats, Activity } from '@/types'
@ -90,7 +90,7 @@ export function DashboardPage() {
title: '活跃用户', title: '活跃用户',
value: stats ? formatNumber(stats.activeUsers) : '-', value: stats ? formatNumber(stats.activeUsers) : '-',
change: calculateGrowth(stats?.activeUsers || 0), change: calculateGrowth(stats?.activeUsers || 0),
icon: Activity, icon: ActivityIcon,
color: 'from-green-500 to-emerald-600', color: 'from-green-500 to-emerald-600',
}, },
{ {
@ -230,7 +230,7 @@ export function DashboardPage() {
{ label: '添加用户', icon: Users, action: 'users' }, { label: '添加用户', icon: Users, action: 'users' },
{ label: '系统设置', icon: Zap, action: 'settings' }, { label: '系统设置', icon: Zap, action: 'settings' },
{ label: '数据备份', icon: Database, action: 'backup' }, { label: '数据备份', icon: Database, action: 'backup' },
{ label: '查看日志', icon: Activity, action: 'logs' }, { label: '查看日志', icon: ActivityIcon, action: 'logs' },
].map((item, index) => ( ].map((item, index) => (
<button <button
key={index} key={index}

Loading…
Cancel
Save