'use client'; import { useState, useEffect, useRef } from 'react'; import Image from 'next/image'; import { useLanguage } from '@/contexts/LanguageContext'; export default function WhyAssetXSection() { const { t } = useLanguage(); const [animate, setAnimate] = useState(false); const sectionRef = useRef(null); useEffect(() => { const currentRef = sectionRef.current; if (!currentRef) return; const observer = new IntersectionObserver( (entries) => { if (entries[0].isIntersecting) { setAnimate(true); observer.disconnect(); // 触发后立即断开,不再监听 } }, { threshold: 0.5 } // 当50%可见时才触发 ); observer.observe(currentRef); return () => observer.disconnect(); }, []); return (
{/* Header - .frame-27 */}
{/* Title - .why-assetx */}

{t('why.title')}

{/* Subtitle */}

{t('why.subtitle')}

{/* Cards Container - .frame-30 */}
{/* Left Large Card - Sustainable Real Yield */}
{/* .frame-33 */}
{/* Icon Container - .container12 */}
System Data
{/* Text Content - .frame-31 */}

{t('why.sustainable.title')}

{t('why.sustainable.desc')}

{/* Chart Image - .frame-11 */} Chart
{/* Right Column - .frame-29 */}
{/* Proven Reliability Card */}
{/* .features2 */}
{/* Left Content - .container13 */}
{/* Icon */}
Shield Check
{/* Text - .frame-28 */}

{t('why.reliability.title')}

{t('why.reliability.desc')}

{/* Right Icon */}
Lock Icon
{/* Flexible Liquidity Card */}
{/* Left Content */}
{/* Icon */}
Arrow
{/* Text Content */}

{t('why.liquidity.title')}

{t('why.liquidity.desc')}

{/* Right Badges */}
{t('why.liquidity.badge1')}
{t('why.liquidity.badge2')}
); }