// AK-P16d Interim-UI (AD-28) — public signer page for /sign/:token, restyled // from hand-written markup to ~/ui components (analog to the login/verify // public routes, which also use ~/ui; the embed-safe PublicFormRenderer rule // does not apply here because this page never runs inside a host iframe). // The form posts the route action's existing contract: otp, signatureSvg, // intentAccepted. Final Subframe optics land as a tracked design-nachzug. import { useState } from "react"; import { Form } from "react-router"; import { useTranslation } from "react-i18next"; import { Alert } from "~/ui/components/Alert"; import { Button } from "~/ui/components/Button"; import { Checkbox } from "~/ui/components/Checkbox"; import { TextArea } from "~/ui/components/TextArea"; import { TextInput } from "~/ui/components/TextInput"; export type PublicSignPageProps = { documentTitle: string; signerName: string; signerEmail: string; isComplete: boolean; errorKey: string | null; submitting: boolean; }; export function PublicSignPage(props: PublicSignPageProps) { const { t } = useTranslation(); // The ~/ui Checkbox is a controlled Radix button; the hidden input carries // the value into the plain form POST the route action expects. const [intentAccepted, setIntentAccepted] = useState(false); return (
{props.signerEmail}

{props.documentTitle}

{t("signature.public.intentIntro", { name: props.signerName })}
{props.isComplete ? ( ) : (
{props.errorKey ? : null}
)}
); }