diff --git a/frontend/src/components/dashboard/EnhancedMetricCard.tsx b/frontend/src/components/dashboard/EnhancedMetricCard.tsx index df3541b7..837bc169 100644 --- a/frontend/src/components/dashboard/EnhancedMetricCard.tsx +++ b/frontend/src/components/dashboard/EnhancedMetricCard.tsx @@ -1,4 +1,4 @@ -import { ReactNode, useState } from "react"; +import React, { ReactNode, useState } from "react"; import { Link } from "react-router"; import { ArrowUpIcon, ArrowDownIcon } from "../../icons"; import { EnhancedTooltip } from "../ui/tooltip/EnhancedTooltip"; @@ -131,9 +131,9 @@ export default function EnhancedMetricCard({ )}
+
+
+
+
+
+
+
+
+
+
+ No data available. Please select a sector.
++ {activeSector ? 'No data available for the selected sector.' : 'No data available. Select a sector or wait for data to load.'} +
- Last updated: {lastUpdated.toLocaleTimeString()} -
++ Last updated: {lastUpdated.toLocaleTimeString()} +
+ {activeSite && ( + <> + • ++ Site: {activeSite.name} +
+ > + )} + {activeSector && ( + <> + • ++ Sector: {activeSector.name} +
+ > + )} + {!activeSector && ( + <> + • ++ Sector: All Sectors +
+ > + )} +No data available. Please select a sector.
++ {activeSector ? 'No data available for the selected sector.' : 'No data available. Select a sector or wait for data to load.'} +
- Last updated: {lastUpdated.toLocaleTimeString()} -
++ Last updated: {lastUpdated.toLocaleTimeString()} +
+ {activeSite && ( + <> + • ++ Site: {activeSite.name} +
+ > + )} + {activeSector && ( + <> + • ++ Sector: {activeSector.name} +
+ > + )} + {!activeSector && ( + <> + • ++ Sector: All Sectors +
+ > + )} +