'use client'; import Image from 'next/image'; import { useState, useEffect } from 'react'; interface ProductMenuProps { isOpen: boolean; onClose: () => void; language: 'zh' | 'en'; } export default function ProductMenu({ isOpen, onClose, language }: ProductMenuProps) { const [isVisible, setIsVisible] = useState(false); const [isClosing, setIsClosing] = useState(false); useEffect(() => { if (isOpen) { setIsVisible(true); setIsClosing(false); } else if (isVisible) { // 触发退出动画 setIsClosing(true); // 动画结束后隐藏组件 const timer = setTimeout(() => { setIsVisible(false); setIsClosing(false); }, 300); // 匹配动画时长 return () => clearTimeout(timer); } }, [isOpen, isVisible]); if (!isVisible) return null; const content = { zh: { coreYieldAssets: '核心收益资产', axFund: 'AX-Fund', axFundDesc: '购买AX-Fund收益代币,获得市场中性收益策略的敞口。收益随时间在代币价格中累积。', axFundBadge: '最高22% APY', axPool: 'AX-Pool', axPoolDesc: '以ALP提供流动性支持收益代币市场并赚取交易费', axPoolBadge: '多元化', platformsProtocols: '平台与协议', launchpad: 'Launchpad', launchpadDesc: '发行与代币化新RWA', defiMarket: 'DeFi市场', defiMarketDesc: '资产代币的交换与借贷', tokenFactory: 'Token Factory', tokenFactoryDesc: '标准化铸造协议', infrastructure: '基础设施', assetCockpit: 'Asset Cockpit', assetCockpitDesc: '投资组合分析与管理', oracleNetwork: 'Oracle Network', oracleNetworkDesc: '实时链下数据源', latestAudit: '最新审计:', auditInfo: 'Oct 2025 (Certik)', viewDocs: '查看文档 →' }, en: { coreYieldAssets: 'Core Yield Assets', axFund: 'AX-Fund', axFundDesc: 'Buy the AX-Fund Yield Token to gain exposure to market-neutral yield strategies. Yield accrues in token price over time.', axFundBadge: 'up to 22% APY', axPool: 'AX-Pool', axPoolDesc: 'Provide liquidity as ALP to support Yield Token markets and earn trading fees', axPoolBadge: 'Diversified', platformsProtocols: 'Platforms & Protocols', launchpad: 'Launchpad', launchpadDesc: 'Issue & tokenize new RWAs.', defiMarket: 'Defi Market', defiMarketDesc: 'Swap & Lending for assets tokens.', tokenFactory: 'Token Factory', tokenFactoryDesc: 'Standardized minting protocol.', infrastructure: 'Infrastructure', assetCockpit: 'Asset Cockpit', assetCockpitDesc: 'Portfolio analytics & mgmt.', oracleNetwork: 'Oracle Network', oracleNetworkDesc: 'Real-time off-chain data feeds.', latestAudit: 'Latest Audit:', auditInfo: 'Oct 2025 (Certik)', viewDocs: 'View Documentation →' } }; const t = content[language]; return ( <> {/* Backdrop */}
{/* Menu */}{t.axFundDesc}
{t.axPoolDesc}
{t.launchpadDesc}
{t.defiMarketDesc}
{t.tokenFactoryDesc}
{t.assetCockpitDesc}
{t.oracleNetworkDesc}