Function
handleFormSubmit
(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
Tested by
no test coverage detected