"use client";
import { useRouter } from 'next/navigation';

export default function TitleHeader({title}: {title: string}) {
    const router = useRouter();
    return (
        <header className="sticky top-0 z-10 w-full">
            <div className="relative w-full h-15 flex items-center justify-center bg-neutral-50 text-ly-16">
                <div className="absolute left-4 w-6 h-6" onClick={() => router.back()}>
                    <svg className="block w-6 h-6" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" width="24" height="24" viewBox="0 0 24 24" fill="none"><path    stroke="rgba(0, 0, 0, 1)" strokeWidth="1.5" strokeLinejoin="round" strokeLinecap="square"  d="M14.5 18L8.5 12L14.5 6"></path></svg>
                </div>
                {title}
            </div>
        </header>
    );
}
