'use client';

import { useTranslation } from 'react-i18next';
import Header from '../Header';
import Footer from '../Footer';
import NewsPageClient from './NewsPageClient';

interface NewsPageWrapperProps {
    locale: string;
    initialData?: {
        articles: any[];
        categories: string[];
    } | null;
}

export default function NewsPageWrapper({ locale, initialData }: NewsPageWrapperProps) {
    const { t: tCommon } = useTranslation('common');

    return (
        <div className="min-h-screen flex flex-col bg-gray-50">
            <Header
                language={locale}
                setLanguage={() => {}} // 这里不需要动态改变语言，由路由控制
                translations={tCommon}
                locale={locale}
            />
            <main className="flex-1">
                <NewsPageClient locale={locale} initialData={initialData} />
            </main>
            <Footer translations={tCommon} />
        </div>
    );
} 