import { Context } from 'hono'; import { html } from 'hono/html'; import { Child } from 'hono/jsx'; import { HtmlEscapedString } from 'hono/utils/html'; type FooterLink = { title: string; url: string; }; type AccountFormProps = { ctx?: Context; children: Child; title: string; submitText?: string; loadingText: string; endpoint: string; successText: string; redirect: string; disabledByDefault?: boolean; customRedirectDelay?: number; footerLinks?: FooterLink[] footerHTML?: string | Promise }; export default function AccountHandler(props: AccountFormProps) { const footerLinkHTML = props.footerLinks?.map((el: FooterLink) => { return ({el.title}); }); return (

{props.title}

{props.children}
{props.footerLinks ? {footerLinkHTML} : (props.footerHTML || "")}
); }