MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / handleSubmit

Function handleSubmit

client/src/component/DiscussionForum.jsx:109–115  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

107 const [answer, setAnswer] = useState('');
108
109 const handleSubmit = (e) => {
110 e.preventDefault();
111 if (answer.trim()) {
112 addAnswer(questionId, answer);
113 setAnswer('');
114 }
115 };
116
117 return (
118 <form onSubmit={handleSubmit} className={`p-4 rounded-md shadow-md mt-4 ${props.mode === 'dark' ? 'bg-gray-700' : 'bg-white'}`}>

Callers

nothing calls this directly

Calls 2

addAnswerFunction · 0.85
addQuestionFunction · 0.85

Tested by

no test coverage detected