From 70a1a7a5ea322dbac55a26298c2f303bb8746322 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 7 Nov 2024 16:25:36 +0100 Subject: [PATCH] :sparkles: Send event when an user opens a modal --- frontend/src/app/main/data/modal.cljs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/app/main/data/modal.cljs b/frontend/src/app/main/data/modal.cljs index 1055014c2..8b88a813f 100644 --- a/frontend/src/app/main/data/modal.cljs +++ b/frontend/src/app/main/data/modal.cljs @@ -10,6 +10,7 @@ [app.common.uuid :as uuid] [app.main.data.events :as ev] [app.main.store :as st] + [beicon.v2.core :as rx] [cljs.core :as c] [potok.v2.core :as ptk])) @@ -30,6 +31,12 @@ (dissoc :type) (assoc :name type))) + ptk/WatchEvent + (watch [_ _ _] + (rx/of (ptk/event + ::ev/event + {::ev/name "show-modal" :type type}))) + ptk/UpdateEvent (update [_ state] (assoc state ::modal {:id id