fix: #3227 show traffic chart only when data is available

This commit is contained in:
wonfen
2025-04-01 13:51:35 +08:00
parent 7b5fd104de
commit 3039f39d40
3 changed files with 8 additions and 5 deletions

View File

@@ -401,10 +401,12 @@ export const EnhancedTrafficStats = () => {
return (
<Grid container spacing={1} columns={{ xs: 8, sm: 8, md: 12 }}>
<Grid size={12}>
{/* 流量图表区域 */}
{trafficGraphComponent}
</Grid>
{trafficGraph && (
<Grid size={12}>
{/* 流量图表区域 */}
{trafficGraphComponent}
</Grid>
)}
{/* 统计卡片区域 */}
{statCards.map((card, index) => (
<Grid key={index} size={4}>