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

Function addChannel

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

Source from the content-addressed store, hash-verified

56 }
57
58 async function addChannel() {
59 const input = document.getElementById(
60 'new-channel-onboarding'
61 ) as HTMLInputElement;
62 if (input.value && input.checkValidity()) {
63 const channel = input.value.toLowerCase();
64 if (channels.includes(channel)) {
65 Toast.error('Channel already added.');
66 } else {
67 setChannels((channels) => [...channels, channel]);
68 input.value = '';
69 }
70 } else {
71 return input.reportValidity();
72 }
73 }
74
75 async function addEmail() {
76 const input = document.getElementById(

Callers 1

OnboardingFormFunction · 0.85

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected