"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { Sparkles } from "lucide-react"; import { useEffect, useMemo, useState } from "react"; import { useTranslation, getServerTranslations } from "@/lib/i18n"; import { cn } from "@/lib/utils"; export function Footer() { const pathname = usePathname(); const [mounted, setMounted] = useState(false); const { t } = useTranslation(); useEffect(() => setMounted(true), []); const getT = (key: string, params?: Record) => { if (!mounted) return getServerTranslations("en").t(key, params); return t(key, params); }; const toolLinks = useMemo( () => [ { name: getT("sidebar.videoToFrames"), href: "/tools/video-frames" }, { name: getT("sidebar.imageCompression"), href: "/tools/image-compress" }, { name: getT("sidebar.audioCompression"), href: "/tools/audio-compress" }, ], // eslint-disable-next-line react-hooks/exhaustive-deps [mounted] ); // Check if we're in the dashboard area (tools pages) const isDashboard = pathname?.startsWith("/tools"); return ( ); }