import * as React from 'react'; import Link from 'next/link'; import { useRouter } from 'next/router'; interface MobileHeaderProps { title?: string; showBack?: boolean; rightAction?: React.ReactNode; } export function MobileHeader({ title, showBack = false, rightAction }: MobileHeaderProps) { const router = useRouter(); const handleBack = () => { if (window.history.length > 1) { router.back(); } else { router.push('/m'); } }; return (
{/* Left side */}
{showBack ? ( ) : (
)}
{/* Center - Title */}

{title || 'LocalGreenChain'}

{/* Right side */}
{rightAction || ( )}
); } export default MobileHeader;