"use client"; import React from 'react'; import { motion } from 'framer-motion'; import StatCard from './StatCard'; interface StatsProps { stats: { totalProducts?: number; totalVendors?: number; totalOrders?: number; totalCustomers?: number; gmv?: number; }; } function formatNumberValue(num: number = 0): string { return new Intl.NumberFormat().format(Math.round(num)); } function formatCurrencyValue(amount: number = 0): string { return new Intl.NumberFormat('en-GB', { style: 'currency', currency: 'GBP', maximumFractionDigits: 0 }).format(amount); } export default function StatsSection({ stats }: StatsProps) { const { totalProducts = 0, totalVendors = 0, totalOrders = 0, totalCustomers = 0, gmv = 0 } = stats; // Container animation variants const containerVariants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.1 } } }; // Item animation variants const itemVariants = { hidden: { y: 20, opacity: 0 }, visible: { y: 0, opacity: 1, transition: { type: "spring", stiffness: 260, damping: 20 } } }; return (
); }