From e6bd87cf846451bd61a3a7dc195cf6950a4d8b37 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Sun, 25 Aug 2024 09:03:03 +0200 Subject: feat: clean up error container messages --- src/frontend/tubo/components/layout.cljs | 2 +- src/frontend/tubo/notifications/views.cljs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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)])]]])) -- cgit v1.2.3