"use client" import { Avatar, AvatarFallback, AvatarImage, } from "@/components/ui/avatar" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "@/components/ui/card" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table" import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar" import { ArrowUpRight } from "lucide-react" import dynamic from "next/dynamic" import Link from "next/link" import { formatPrice } from "../dashboard-3/lib/utils" import { DashboardHeader } from "./components/dashboard-header" import DashboardSidebar from "./components/dashboard-sidebar" import { SectionCards } from "./components/section-cards" const ReactECharts = dynamic(() => import("echarts-for-react"), { ssr: false }) const salesData = [ { name: "Jan", sales: 4000 }, { name: "Feb", sales: 3000 }, { name: "Mar", sales: 5000 }, { name: "April", sales: 2780 }, { name: "May", sales: 1890 }, { name: "June", sales: 6390 }, { name: "July", sales: 3490 }, { name: "Aug", sales: 9688 }, { name: "Seb", sales: 2500 }, { name: "Oct", sales: 7538 }, { name: "Nov", sales: 1598 }, { name: "Dec", sales: 7412 }, ] const salesChartOptions = { tooltip: { trigger: "axis", backgroundColor: "#fff", borderColor: "#e5e7eb", borderWidth: 1, textStyle: { color: "#111827", fontSize: 12 }, }, grid: { left: "3%", right: "4%", bottom: "3%", containLabel: true }, xAxis: { type: "category", data: salesData.map((d) => d.name), axisTick: { show: false }, axisLine: { lineStyle: { color: "#d1d5db" } }, axisLabel: { fontSize: 12, interval: (index: number, value: string) => { return window.innerWidth > 640 ? true : index % 2 === 0 }, }, }, yAxis: { type: "value", axisLine: { show: false }, splitLine: { lineStyle: { color: "#e5e7eb", type: "dashed" } }, axisLabel: { fontSize: 12 }, }, series: [ { data: salesData.map((d) => d.sales), type: "bar", itemStyle: { borderRadius: [4, 4, 0, 0], color: "#6366f1", }, barWidth: "40%", }, ], media: [ { query: { maxWidth: 640 }, option: { grid: { left: "8%", right: "8%" }, xAxis: { axisLabel: { fontSize: 10, rotate: 45 } }, yAxis: { axisLabel: { fontSize: 10 } }, }, }, ], } const recentOrders = [ { id: "ORD-7352", date: "2025-04-24", customer: "Emma Johnson", amount: 235.89, status: "Delivered", }, { id: "ORD-7351", date: "2025-04-23", customer: "Michael Chen", amount: 125.99, status: "Processing", }, { id: "ORD-7350", date: "2025-04-23", customer: "Sophia Martinez", amount: 432.2, status: "Shipped", }, { id: "ORD-7349", date: "2025-04-22", customer: "James Wilson", amount: 76.45, status: "Delivered", }, { id: "ORD-7348", date: "2025-04-21", customer: "Olivia Brown", amount: 189.5, status: "Processing", }, { id: "ORD-7347", date: "2025-04-20", customer: "William Davis", amount: 312.75, status: "Delivered", }, { id: "ORD-7346", date: "2025-04-19", customer: "Ava Garcia", amount: 94.2, status: "Shipped", }, ] export default function DashboardPage() { return ( {/* Here you can choose of custom sidebar behavior (inset, sidebar, floating) default use: sidebar */}
Sales Overview Yearly sales performance for the last 12 months
Recent Orders Detailed view of the last 7 days order history
Order ID Date Customer Status Amount {recentOrders.map((order) => ( {order.id} {order.date}
{order.customer.charAt(0)} {order.customer}
{order.status} {formatPrice(order.amount)}
))}
) }