diff options
Diffstat (limited to 'src/frontend/tubo/components/notification.cljs')
-rw-r--r-- | src/frontend/tubo/components/notification.cljs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/tubo/components/notification.cljs b/src/frontend/tubo/components/notification.cljs index 61c10ad..2f03cd4 100644 --- a/src/frontend/tubo/components/notification.cljs +++ b/src/frontend/tubo/components/notification.cljs @@ -4,7 +4,7 @@ [tubo.events :as events])) (defn notification-content - [{:keys [failure parse-error status status-text] :as notification} key] + [{:keys [failure parse-error status status-text] :as notification}] (when notification [:div.py-4.pl-4.pr-8.rounded.backdrop-blur.flex.flex-col.justify-center.shadow.shadow-neutral-700 {:class (clojure.string/join @@ -13,7 +13,7 @@ :error ["bg-red-600/90 text-white"] ["bg-neutral-300"]))} [:button.text-lg.absolute.top-1.right-2 - {:on-click #(rf/dispatch [::events/remove-notification key])} + {:on-click #(rf/dispatch [::events/remove-notification (:id notification)])} [:i.fa-solid.fa-close]] [:span.font-bold (str (when status (str status ": ")) status-text)] (when parse-error @@ -25,4 +25,4 @@ (let [notifications @(rf/subscribe [:notifications])] [:div.fixed.flex.flex-col.items-end.gap-2.top-16.z-20.w-full.py-1.px-2 (for [[i notification] (map-indexed vector notifications)] - ^{:key i} [notification-content notification i])]))) + ^{:key i} [notification-content notification])]))) |