'use client'; import { useState, useEffect } from 'react'; import Navigation from '@/components/Navigation'; import Footer from '@/components/Footer'; import { type Language, type LanguageContent } from '@/lib/languages'; interface ClientLayoutProps { children: React.ReactNode; lang: Language; t: LanguageContent; } interface Star { left: string; top: string; animationDelay: string; animationDuration: string; } export default function ClientLayout({ children, lang, t }: ClientLayoutProps) { const [stars, setStars] = useState([]); useEffect(() => { const generateStars = () => { const newStars: Star[] = []; for (let i = 0; i < 50; i++) { newStars.push({ left: `${Math.random() * 100}%`, top: `${Math.random() * 100}%`, animationDelay: `${Math.random() * 2}s`, animationDuration: `${2 + Math.random() * 3}s`, }); } setStars(newStars); }; generateStars(); }, []); return (
{/* Animated Background */}
{stars.map((style, i) => (
))}
{children}
); }