From 63fbf70eaa448730abbb54370441056f0a5f9487 Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Mon, 22 Jun 2020 19:05:55 -0400
Subject: Disable submit when loading. Fixes #706

---
 ui/src/components/comment-form.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'ui/src/components/comment-form.tsx')

diff --git a/ui/src/components/comment-form.tsx b/ui/src/components/comment-form.tsx
index 591bbf1b..24bfb7cb 100644
--- a/ui/src/components/comment-form.tsx
+++ b/ui/src/components/comment-form.tsx
@@ -151,7 +151,7 @@ export class CommentForm extends Component<CommentFormProps, CommentFormState> {
               <button
                 type="submit"
                 class="btn btn-sm btn-secondary mr-2"
-                disabled={this.props.disabled}
+                disabled={this.props.disabled || this.state.loading}
               >
                 {this.state.loading ? (
                   <svg class="icon icon-spinner spin">
-- 
cgit v1.2.3

