From 955bf0ef9ea5dba9a6c8e209b7c459e7c14a1175 Mon Sep 17 00:00:00 2001
From: Eva <eva.marco@kaleidos.net>
Date: Mon, 24 Jul 2023 08:28:05 +0200
Subject: [PATCH] :bug: Fix empty reply comments

---
 frontend/src/app/main/ui/comments.cljs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/frontend/src/app/main/ui/comments.cljs b/frontend/src/app/main/ui/comments.cljs
index 0b0cdff15..fe4651d8b 100644
--- a/frontend/src/app/main/ui/comments.cljs
+++ b/frontend/src/app/main/ui/comments.cljs
@@ -214,7 +214,11 @@
                             :select-on-focus true
                             :on-change on-change}]
      [:div.buttons
-      [:input.btn-primary {:type "button" :value "Post" :on-click on-submit*}]
+      [:input.btn-primary {:type "button"
+                           :value "Post"
+                           :on-click on-submit*
+                           :disabled (or (fm/all-spaces? @content)
+                                         (str/empty-or-nil? @content))}]
       [:input.btn-secondary {:type "button" :value "Cancel" :on-click on-cancel}]]]))
 
 (mf/defc comment-item