We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37b40af commit 3634b32Copy full SHA for 3634b32
docs/src/modules/components/AppLayoutDocsFooter.js
@@ -336,6 +336,13 @@ export default function AppLayoutDocsFooter(props) {
336
337
const handleSubmitComment = (event) => {
338
event.preventDefault();
339
+ // Block more than one submission.
340
+ // Technically, setState() is async in React, so a ninja user could still
341
+ // manage to trigger a double form submission. Still, let's wait and see
342
+ // before adding the overhead of a React ref to solve this.
343
+ if (!commentOpen) {
344
+ return;
345
+ }
346
setCommentOpen(false);
347
processFeedback();
348
};
0 commit comments