MCPcopy Create free account
hub / github.com/code100x/cms / handleFormSubmit

Function handleFormSubmit

src/components/comment/CommentInputForm.tsx:31–43  ·  view source on GitHub ↗
(e: React.FormEvent<HTMLFormElement>)

Source from the content-addressed store, hash-verified

29 },
30 });
31 const handleFormSubmit = (e: React.FormEvent<HTMLFormElement>) => {
32 e.preventDefault();
33 const formData = new FormData(e.target as HTMLFormElement);
34 const content = formData.get('content') as string;
35
36 execute({
37 content,
38 contentId,
39 parentId,
40 currentPath,
41 });
42 setCommentText('');
43 };
44
45 const isAllSpaces = (str: string): boolean => (/^\s*$/).test(str);
46

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected