+
{summaryCard(
"Last 30 minutes",
"Active users",
@@ -117,7 +117,7 @@ const MiniRealtimeAnalytics = () => {
colorClass: "text-sky-200",
titleClass: "text-sky-100 font-bold text-md",
descriptionClass: "text-sky-200 text-md font-semibold",
- background: "bg-gradient-to-br from-sky-800 to-sky-700",
+ background: "h-[150px] bg-gradient-to-br from-sky-900 to-sky-800",
icon: Users,
iconColor: "text-sky-900",
iconBackground: "bg-sky-300"
@@ -131,7 +131,7 @@ const MiniRealtimeAnalytics = () => {
colorClass: "text-sky-200",
titleClass: "text-sky-100 font-bold text-md",
descriptionClass: "text-sky-200 text-md font-semibold",
- background: "bg-gradient-to-br from-sky-800 to-sky-700",
+ background: "h-[150px] bg-gradient-to-br from-sky-900 to-sky-800",
icon: Activity,
iconColor: "text-sky-900",
iconBackground: "bg-sky-300"
@@ -139,53 +139,55 @@ const MiniRealtimeAnalytics = () => {
)}
-
-
-
- value + "m"}
- className="text-xs"
- tick={{ fill: "#BAE6FD" }}
- />
-
- {
- if (active && payload && payload.length) {
- const timestamp = new Date(
- Date.now() + payload[0].payload.minute * 60000
- );
- return (
-
-
-
- {format(timestamp, "h:mm a")}
-
-
-
- Active Users:
-
-
- {payload[0].value.toLocaleString()}
-
-
-
-
- );
- }
- return null;
- }}
- />
-
-
-
-
+
+
+
+
+
+ value + "m"}
+ className="text-xs"
+ tick={{ fill: "#BAE6FD" }}
+ />
+
+ {
+ if (active && payload && payload.length) {
+ const timestamp = new Date(payload[0].payload.timestamp);
+ return (
+
+
+
+ {format(timestamp, "h:mm a")}
+
+
+
+ Active Users:
+
+
+ {payload[0].value}
+
+
+
+
+ );
+ }
+ return null;
+ }}
+ />
+
+
+
+
+
+
);
};
diff --git a/dashboard/src/components/dashboard/MiniSalesChart.jsx b/dashboard/src/components/dashboard/MiniSalesChart.jsx
index a7a18be..a853f99 100644
--- a/dashboard/src/components/dashboard/MiniSalesChart.jsx
+++ b/dashboard/src/components/dashboard/MiniSalesChart.jsx
@@ -72,7 +72,7 @@ const MiniStatCard = memo(({
active = true
}) => (