This commit is contained in:
NotII
2025-07-01 01:49:49 +01:00
parent 20ae136e37
commit 18e87721e2
8 changed files with 458 additions and 110 deletions

View File

@@ -8,6 +8,7 @@ import { Skeleton } from "@/components/ui/skeleton";
import { Users, Crown, UserPlus, UserCheck, Star } from "lucide-react";
import { getCustomerInsightsWithStore, type CustomerInsights } from "@/lib/services/analytics-service";
import { formatGBP } from "@/utils/format";
import { CustomerInsightsSkeleton } from './SkeletonLoaders';
export default function CustomerInsightsChart() {
const [data, setData] = useState<CustomerInsights | null>(null);
@@ -85,26 +86,11 @@ export default function CustomerInsightsChart() {
if (isLoading) {
return (
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Users className="h-5 w-5" />
Customer Insights
</CardTitle>
<CardDescription>
Customer segmentation and behavior analysis
</CardDescription>
</CardHeader>
<CardContent>
<div className="space-y-6">
<Skeleton className="h-32 w-full" />
<div className="grid grid-cols-2 gap-4">
<Skeleton className="h-20" />
<Skeleton className="h-20" />
</div>
</div>
</CardContent>
</Card>
<CustomerInsightsSkeleton
title="Customer Insights"
description="Customer segmentation and behavior analysis"
icon={Users}
/>
);
}