/* eslint-disable no-restricted-globals */ /* eslint-disable jsx-a11y/click-events-have-key-events */ /* eslint-disable jsx-a11y/no-static-element-interactions */ import LIcon from "@/components/ui/lucid-icon/lucid-icon"; import { useLocale } from "@/hooks/useLocale"; interface CoreSummaryHeaderProps { children: string; hideBackButton?: boolean; onClickBackButton?: () => void; } const CoreSummaryHeader = ({ hideBackButton = false, ...props }: CoreSummaryHeaderProps) => { const { t } = useLocale(); return (
{!hideBackButton && (
{ try { if (props.onClickBackButton) { props.onClickBackButton(); return; } history.back(); } catch (error) { /* empty */ } }} > {t("Go back")}
)}

{props.children}

); }; export default CoreSummaryHeader;