'use client'; import { useRouter } from 'next/navigation'; interface MobileBackButtonProps { label?: string; fallbackHref?: string; alwaysShow?: boolean; } export function MobileBackButton({ label, fallbackHref, alwaysShow = false }: MobileBackButtonProps) { const router = useRouter(); const handleBack = () => { if (window.history.length > 1) { router.back(); } else if (fallbackHref) { router.push(fallbackHref); } else { router.push('/'); } }; return ( ); }