import { useTranslations } from "@/i18n/utils"; import type { Lang } from "@/types/i18n"; import { personalInfo } from "@/lib/data/index"; import { motion } from "framer-motion"; import { useState, useEffect } from "react"; import { defaultLang } from "@/i18n/ui"; import Container from "./ui/Container"; import { type FooterProps } from "@/types"; export default function Footer({ lang: propLang }: FooterProps) { const [lang, setLang] = useState(propLang || defaultLang); useEffect(() => { const htmlLang = document.documentElement.lang as Lang; if (htmlLang && (!propLang || htmlLang !== lang)) { setLang(htmlLang); } }, [propLang, lang]); const t = useTranslations(lang); return ( ); }