aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2024-08-25 09:03:03 +0200
committerMiguel Ángel Moreno <mail@migalmoreno.com>2024-08-25 09:03:03 +0200
commite6bd87cf846451bd61a3a7dc195cf6950a4d8b37 (patch)
treed0baf56104cdb0577a2937425d0b6b5ff15f0915
parent143fc6ce45cee69ea2b5352ad8041f72cd50c2d8 (diff)
feat: clean up error container messages
-rw-r--r--src/frontend/tubo/components/layout.cljs2
-rw-r--r--src/frontend/tubo/notifications/views.cljs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/frontend/tubo/components/layout.cljs b/src/frontend/tubo/components/layout.cljs
index a55526f..d0bed45 100644
--- a/src/frontend/tubo/components/layout.cljs
+++ b/src/frontend/tubo/components/layout.cljs
@@ -210,7 +210,7 @@
[:div.flex.flex-col.gap-y-6.border-border-neutral-300.rounded.dark:border-stone-700.bg-neutral-300.dark:bg-neutral-800.p-5
[:div.flex.items-center.gap-2.text-xl
[:i.fa-solid.fa-circle-exclamation]
- [:h3.font-bold (str (when status (str status ": ")) status-text)]]
+ [:h3.font-bold (str status (when (and status status-text) ": ") status-text)]]
(when parse-error
[:span (:status-text parse-error)])
[:div.flex.justify-center.gap-x-3
diff --git a/src/frontend/tubo/notifications/views.cljs b/src/frontend/tubo/notifications/views.cljs
index e886a82..6c8a09a 100644
--- a/src/frontend/tubo/notifications/views.cljs
+++ b/src/frontend/tubo/notifications/views.cljs
@@ -20,7 +20,7 @@
{:on-click
#(rf/dispatch [:notifications/remove (:id notification)])}
[:i.fa-solid.fa-close]]
- [:span.font-bold (str (when status (str status ": ")) status-text)]
+ [:span.font-bold (str status (when (and status status-text) ": ") status-text)]
(when parse-error
[:span.line-clamp-1 (:status-text parse-error)])]]]))