diff --git a/src/components/sections/social-proof-section.tsx b/src/components/sections/social-proof-section.tsx new file mode 100644 index 0000000..ce9a96c --- /dev/null +++ b/src/components/sections/social-proof-section.tsx @@ -0,0 +1,73 @@ +'use client'; + +import { useEffect, useRef, useState } from 'react'; +import { motion } from 'framer-motion'; +import { STATS } from '@/lib/constants'; +import { useReducedMotion } from '@/hooks/use-reduced-motion'; + +export function SocialProofSection() { + const [isVisible, setIsVisible] = useState(false); + const sectionRef = useRef(null); + const shouldReduceMotion = useReducedMotion(); + + useEffect(() => { + const observer = new IntersectionObserver( + ([entry]) => { + if (entry?.isIntersecting) { + setIsVisible(true); + } + }, + { threshold: 0.2 } + ); + + if (sectionRef.current) { + observer.observe(sectionRef.current); + } + + return () => observer.disconnect(); + }, []); + + return ( +
+
+ +

+ 值得信赖的数字化伙伴 +

+

+ 深耕企业数字化领域,以专业实力赢得客户信赖 +

+
+ + + {STATS.map((stat) => ( +
+
+ {stat.value} +
+
+ {stat.label} +
+
+ ))} +
+
+
+ ); +}