(event)
| 205 | function CommentForm({parentId, placeholder, onSubmitted}) { |
| 206 | const [content, setContent] = useState(""); |
| 207 | const handleSubmit = (event) => { |
| 208 | if (!content.trim()) { |
| 209 | event.preventDefault(); |
| 210 | return; |
| 211 | } |
| 212 | setTimeout(() => { |
| 213 | setContent(""); |
| 214 | onSubmitted?.(); |
| 215 | }); |
| 216 | }; |
| 217 | return ( |
| 218 | <Form method="post" onSubmit={handleSubmit} style={{display: 'flex', gap: '0.5rem', alignItems: 'flex-start'}}> |
| 219 | <input type="hidden" name="ParentID" value={parentId}/> |
nothing calls this directly
no outgoing calls
no test coverage detected