"use client";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@hanzo/ui/primitives/card";
import { Button } from "@hanzo/ui/primitives/button";
import { Badge } from "@hanzo/ui/primitives/badge";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@hanzo/ui/primitives/tabs";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@hanzo/ui/primitives/select";
import { Progress } from "@hanzo/ui/primitives/progress";
import {
TrendingUp,
TrendingDown,
Users,
DollarSign,
Activity,
CreditCard,
Download,
Calendar
} from "lucide-react";
// Metric cards data
const metrics = [
{
title: "Total Revenue",
value: "$45,231.89",
change: "+20.1%",
trend: "up",
icon:
},
{
title: "Active Users",
value: "2,350",
change: "+15.3%",
trend: "up",
icon:
},
{
title: "Sales",
value: "12,234",
change: "+19%",
trend: "up",
icon:
},
{
title: "Active Now",
value: "573",
change: "-2.4%",
trend: "down",
icon:
}
];
// Recent sales data
const recentSales = [
{ name: "Olivia Martin", email: "olivia@example.com", amount: "$1,999.00" },
{ name: "Jackson Lee", email: "jackson@example.com", amount: "$39.00" },
{ name: "Isabella Nguyen", email: "isabella@example.com", amount: "$299.00" },
{ name: "William Kim", email: "will@example.com", amount: "$99.00" },
{ name: "Sofia Davis", email: "sofia@example.com", amount: "$39.00" }
];
export default function AnalyticsDashboard() {
return (
{/* Header */}
Analytics Dashboard
Built with @hanzo/ui components
{/* Metric Cards */}
{metrics.map((metric) => (
{metric.title}
{metric.icon}
{metric.value}
{metric.trend === "up" ? (
) : (
)}
{metric.change}
from last month
))}
{/* Main Content Tabs */}
Overview
Analytics
Reports
Notifications
{/* Chart Card */}
Revenue Overview
Monthly revenue for the current year
Chart Component (@hanzo/ui)
{/* Recent Sales */}
Recent Sales
You made 265 sales this month.
{recentSales.map((sale, i) => (
{sale.name.split(" ").map(n => n[0]).join("")}
{sale.amount}
))}
{/* Additional Stats */}
Conversion Rate
Visitor to customer conversion
Rate
3.2%
+0.5% from last month
Avg. Order Value
Average purchase amount
Customer Satisfaction
Based on reviews
4.8/5.0
{[...Array(5)].map((_, i) => (
))}
Based on 1,234 reviews
);
}