TitleHeader.tsx 837 B

12345678910111213141516
  1. "use client";
  2. import { useRouter } from 'next/navigation';
  3. export default function TitleHeader({title}: {title: string}) {
  4. const router = useRouter();
  5. return (
  6. <header className="sticky top-0 z-10 w-full">
  7. <div className="relative w-full h-15 flex items-center justify-center bg-neutral-50 text-ly-16">
  8. <div className="absolute left-4 w-6 h-6" onClick={() => router.back()}>
  9. <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>
  10. </div>
  11. {title}
  12. </div>
  13. </header>
  14. );
  15. }