import { ReactNode } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router"; import { BannerAlert } from "~/ui/components/BannerAlert"; // Subframe migration (strangler shim): // Keeps the original WarningBanner API but renders the Subframe design-system BannerAlert // (type="warning"). BannerAlert has no separate title slot, so the title is composed into the // content (rendered bold) alongside text/redirect/children — same as before, all ReactNode. // `redirect` maps to BannerAlert's `actionLabel` (the underlined action). interface Props { title?: ReactNode; text?: ReactNode; redirect?: string; children?: ReactNode; } export default function WarningBanner({ title, text = "", redirect, children }: Props) { const { t } = useTranslation(); return ( {t("shared.goTo")} {redirect} ) : undefined } > {title ?? t("shared.warning")}{" "} {text} {children} ); }