MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / handleSubmit

Function handleSubmit

src/Components/Post/PostContent/PostContent.jsx:207–216  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

205function 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}/>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected