'use client'; import { useTranslation } from "@/lib/hooks/useTranslation"; import { useRouter } from "next/navigation"; export function BackButton() { const { t } = useTranslation(); const router = useRouter(); const handleGoBack = () => { // Check if we can go back in history if (window.history.length > 1) { // Go back to previous page router.back(); } else { // Fallback to home page if there's no history router.push('/'); } }; return ( ); }