From 8a6cf572f3154c4a0d4e3f9c117e482f2f582f33 Mon Sep 17 00:00:00 2001 From: kudinDmitriyUp Date: Thu, 2 Jul 2026 00:19:58 +0000 Subject: [PATCH] Bob AI: Updated Stats section with dark background, animated count-u --- src/pages/HomePage/sections/Stats.tsx | 163 ++++++++++++++++++++------ 1 file changed, 128 insertions(+), 35 deletions(-) diff --git a/src/pages/HomePage/sections/Stats.tsx b/src/pages/HomePage/sections/Stats.tsx index 6b99c1f..8aafc4d 100644 --- a/src/pages/HomePage/sections/Stats.tsx +++ b/src/pages/HomePage/sections/Stats.tsx @@ -1,41 +1,134 @@ -// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this -// file as the canonical source for the "stats" section. +/* eslint-disable */ +// @ts-nocheck — generated by catalog-eject; runtime-correct but TS strict-mode false-positives on inlined catalog body +import { cls } from "@/lib/utils"; +import Button from "@/components/ui/Button"; +import TextAnimation from "@/components/ui/TextAnimation"; +import ImageOrVideo from "@/components/ui/ImageOrVideo"; +import ScrollReveal from "@/components/ui/ScrollReveal"; +import { useEffect, useRef } from "react"; +import { motion, useInView, animate } from "motion/react"; -import React from 'react'; -import MetricsMediaCards from '@/components/sections/metrics/MetricsMediaCards'; -import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; +const metrics = [ + { + value: "+50", + title: "Businesses", + description: "Active digital presence.", + imageSrc: "http://img.b2bpic.net/free-photo/3d-geometric-abstract-background_1048-11112.jpg" + }, + { + value: "7", + title: "Days", + description: "Guaranteed delivery time.", + imageSrc: "http://img.b2bpic.net/free-vector/ring-glowing-points-black_1217-1373.jpg" + }, + { + value: "100%", + title: "Satisfaction", + description: "Or you don't pay.", + imageSrc: "http://img.b2bpic.net/free-photo/closeup-shot-glass-marbles_53876-47208.jpg" + } +]; + +type Metric = { + value: string; + title: string; + description: string; +} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); + +function AnimatedStat({ value, prefix = "", suffix = "", label1, label2, delay = 0 }: { value: number, prefix?: string, suffix?: string, label1: string, label2: string, delay?: number }) { + const nodeRef = useRef(null as any); + const inView = useInView(nodeRef, { once: true, margin: "-50px" }); + + useEffect(() => { + if (inView && nodeRef.current) { + const controls = animate(0, value, { + duration: 2, + delay: delay, + ease: "easeOut", + onUpdate(val) { + if (nodeRef.current) { + nodeRef.current.textContent = `${prefix}${Math.round(val)}${suffix}`; + } + } + }); + return () => controls.stop(); + } + }, [inView, value, prefix, suffix, delay]); -export default function StatsSection(): React.JSX.Element { return ( -
- - - +
+
+ {prefix}0{suffix}
+
+ {label1} + {label2} +
+
+ ); +} + +const StatsInline = () => ( +
+
+ + {/* Stats Grid */} +
+
+ +
+
+ +
+
+ +
+
+ + {/* Guarantee Quote */} + +
+

+ "If we don't deliver in 7 days,
you don't pay. Period." +

+

+ — Apex Web Group +

+
+
+ +
+
+); + +export default function StatsSection() { + return ( +
+ +
); }