"use client"; import { useInView } from "@/hooks/use-in-view"; import { useCountUp } from "@/hooks/use-count-up"; import { Leaf, Zap, Recycle, Music } from "lucide-react"; const stats = [ { icon: Recycle, value: 2.5, suffix: "M lbs", label: "Waste Diverted from Landfill", decimals: 1, }, { icon: Zap, value: 850, suffix: " MWh", label: "Clean Energy Generated", decimals: 0, }, { icon: Leaf, value: 1200, suffix: " tons", label: "CO2 Emissions Saved", decimals: 0, }, { icon: Music, value: 500, suffix: "+", label: "Festivals Powered", decimals: 0, }, ]; function StatCard({ stat, isInView, delay, }: { stat: (typeof stats)[0]; isInView: boolean; delay: number; }) { const count = useCountUp(stat.value, isInView, 2500, stat.decimals); return (
{stat.label}
Proof that giving a shit actually changes the world.