MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / addEmail

Function addEmail

apps/web/ui/OnboardingForm/index.tsx:75–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 async function addEmail() {
76 const input = document.getElementById(
77 'new-email-onboarding'
78 ) as HTMLInputElement;
79 if (input.value && input.checkValidity()) {
80 const email = input.value;
81 if (emails.includes(email)) {
82 Toast.error('Email already added.');
83 } else {
84 setEmails((emails) => [...emails, email]);
85 input.value = '';
86 }
87 } else {
88 return input.reportValidity();
89 }
90 }
91
92 function removeChannel(channel: string) {
93 setChannels(channels.filter((c) => c !== channel));

Callers 1

OnboardingFormFunction · 0.85

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected