MCPcopy Create free account
hub / github.com/dailydotdev/apps / getFormEmail

Function getFormEmail

packages/shared/src/components/auth/common.tsx:62–69  ·  view source on GitHub ↗
(e: React.FormEvent)

Source from the content-addressed store, hash-verified

60}
61
62export const getFormEmail = (e: React.FormEvent): string => {
63 const form = e.currentTarget as HTMLFormElement;
64 const input = Array.from(form.elements).find((el) =>
65 ['email', 'traits.email'].includes(el.getAttribute('name') ?? ''),
66 ) as HTMLInputElement;
67
68 return input?.value?.trim() ?? '';
69};
70
71export enum AuthDisplay {
72 Default = 'default',

Callers 2

onEmailSignupFunction · 0.90
onEmailCheckFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected