"use client"; import { Suspense, useEffect } from 'react'; import dynamic from 'next/dynamic'; // Dynamically import the 3D stats component const StatsSection = dynamic(() => import('./StatsSection'), { ssr: false, loading: () =>
}); export default function ClientStatsWrapper({ stats }: { stats: any }) { // Debug the stats to see what's being passed useEffect(() => { console.log('Stats data received in client component:', stats); }, [stats]); // Apply defaults if stats is undefined const safeStats = stats || { totalProducts: 0, totalVendors: 0, totalOrders: 0, totalCustomers: 0, gmv: 0 }; return ( }> ); }