import React from 'react'; import { useNavigate } from 'react-router-dom'; interface HeaderProps { title?: string; showBackButton?: boolean; rightAction?: React.ReactNode; } const Header: React.FC = ({ title, showBackButton = false, rightAction }) => { const navigate = useNavigate(); const handleBack = () => { navigate(-1); }; return (
{showBackButton ? ( ) : (
)} {title &&

{title}

} {rightAction ? (
{rightAction}
) : (
)}
); }; export default Header;