From f095e1b29fd5dd4487d05890a5205039196c6f14 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 20 Jun 2024 08:03:18 +0200 Subject: [PATCH] :sparkles: Replace custom all-spaces? fn with generic str/blank? --- frontend/src/app/main/ui/comments.cljs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/ui/comments.cljs b/frontend/src/app/main/ui/comments.cljs index fd156e6a7..5427b29f1 100644 --- a/frontend/src/app/main/ui/comments.cljs +++ b/frontend/src/app/main/ui/comments.cljs @@ -17,7 +17,6 @@ [app.main.refs :as refs] [app.main.store :as st] [app.main.ui.components.dropdown :refer [dropdown]] - [app.main.ui.components.forms :as fm] [app.main.ui.icons :as i] [app.util.dom :as dom] [app.util.i18n :as i18n :refer [tr]] @@ -96,7 +95,7 @@ (let [show-buttons? (mf/use-state false) content (mf/use-state "") - disabled? (or (fm/all-spaces? @content) + disabled? (or (str/blank? @content) (str/empty-or-nil? @content)) on-focus @@ -155,7 +154,7 @@ pos-x (* (:x position) zoom) pos-y (* (:y position) zoom) - disabled? (or (fm/all-spaces? content) + disabled? (or (str/blank? content) (str/empty-or-nil? content)) on-esc @@ -225,7 +224,7 @@ (mf/deps @content) (fn [] (on-submit @content))) - disabled? (or (fm/all-spaces? @content) + disabled? (or (str/blank? @content) (str/empty-or-nil? @content))] [:div {:class (stl/css :edit-form)}