MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / defaultHtmlContent

Function defaultHtmlContent

pages/mfa-verify.tsx:161–187  ·  view source on GitHub ↗
({ email, redirectUrl, availableMethods, error }: {
  error?: {
    title: string;
    message: string;
  };
  email?: string;
  redirectUrl?: string;
  availableMethods?: MultiFactorAuthMethodType[];
})

Source from the content-addressed store, hash-verified

159}
160
161function defaultHtmlContent({ email, redirectUrl, availableMethods, error }: {
162 error?: {
163 title: string;
164 message: string;
165 };
166 email?: string;
167 redirectUrl?: string;
168 availableMethods?: MultiFactorAuthMethodType[];
169}) {
170 const multiFactorAuthVerifyFormReactNode = (
171 <MultiFactorAuthVerifyForm
172 email={email || ''}
173 redirectUrl={redirectUrl || '/'}
174 availableMethods={availableMethods || []}
175 error={error}
176 />
177 );
178 const multiFactorAuthVerifyFormHtml = renderToString(multiFactorAuthVerifyFormReactNode);
179
180 return html`
181 <main id="main">
182 <section class="max-w-3xl mx-auto flex flex-col items-center justify-center">
183 ${multiFactorAuthVerifyFormHtml}
184 </section>
185 </main>
186 `;
187}
188
189export default page({
190 get,

Callers 2

getFunction · 0.70
postFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected