'use client'; import { useState } from 'react'; import Link from 'next/link'; import Header from '@/app/components/Header'; import Footer from '@/app/components/Footer'; import { supportTranslations, type SupportLanguage } from '../../translations'; interface SupportPageClientProps { locale: string; } export default function SupportPageClient({ locale }: SupportPageClientProps) { const [language, setLanguage] = useState( locale === 'zh' ? 'zh-CN' : locale === 'zh-TW' ? 'zh-TW' : 'en', ); const [activeTab, setActiveTab] = useState('faq'); const t = supportTranslations[language] || supportTranslations['zh-CN']; const handleLanguageChange = (newLanguage: string) => { const validLanguage = newLanguage as SupportLanguage; setLanguage(validLanguage); }; return (

{t.title}

{t.subtitle}

{Object.entries(t.tabs).map(([key, label]) => ( ))}
{activeTab === 'faq' && (

{t.faq.title}

{t.faq.categories.map((category, index) => (

{category.name}

{category.questions.map((item, qIndex) => (

{item.q}

{item.a}

))}
))}
)} {activeTab === 'contact' && (

{t.contactSupport.title}

{t.contactSupport.methods.map((method, index) => (
{method.icon}

{method.type}

{method.value}

{method.description}

))}
)} {(activeTab === 'docs' || activeTab === 'tickets') && (

功能开发中

该功能正在开发中,敬请期待。

)}
); }