This commit is contained in:
NotII
2025-06-29 03:05:42 +01:00
parent 2df47e1052
commit f61a7e0276
3 changed files with 354 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
import AnalyticsDashboard from "@/components/analytics/AnalyticsDashboard";
import { fetchServer } from '@/lib/api';
interface AnalyticsOverview {
orders: {
total: number;
completed: number;
pending: number;
completionRate: string;
};
revenue: {
total: number;
monthly: number;
weekly: number;
averageOrderValue: number;
};
products: {
total: number;
};
customers: {
unique: number;
};
}
export default async function AnalyticsPage() {
const analyticsData = await fetchServer<AnalyticsOverview>("/analytics/overview");
return (
<div className="space-y-6">
<div>
<h1 className="text-3xl font-bold text-foreground">Analytics Dashboard</h1>
<p className="text-muted-foreground mt-2">
Comprehensive insights into your store performance, sales trends, and customer behavior.
</p>
</div>
<AnalyticsDashboard initialData={analyticsData} />
</div>
);
}