'use client'; import { useState, useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import Header from '../Header'; import Footer from '../Footer'; import NewsArticlePageClient from './NewsArticlePageClient'; interface NewsArticlePageWrapperProps { locale: string; articleId: string; initialData?: { article: any; relatedArticles: any[]; } | null; } export default function NewsArticlePageWrapper({ locale, articleId, initialData }: NewsArticlePageWrapperProps) { const [language, setLanguage] = useState(locale); const { t: tCommon } = useTranslation('common'); // 同步locale变化 useEffect(() => { setLanguage(locale); }, [locale]); return (
); }