From 8370fd06d4daf9dff467072a574770a3810f1f00 Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Thu, 4 Jul 2024 09:29:43 +0200 Subject: [PATCH] Remove cb --- .../src/app/main/ui/workspace/tokens/core.cljs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/core.cljs b/frontend/src/app/main/ui/workspace/tokens/core.cljs index 31d8f9a69..29d004720 100644 --- a/frontend/src/app/main/ui/workspace/tokens/core.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/core.cljs @@ -65,10 +65,10 @@ (ptk/reify ::done ptk/WatchEvent (watch [_ _ _] - (rx/from (p/resolved true))))) + (rx/of :the/end)))) (defn apply-token - [{:keys [attributes shape-ids token on-update-shape cb] :as _props}] + [{:keys [attributes shape-ids token on-update-shape] :as _props}] (ptk/reify ::apply-token ptk/WatchEvent (watch [_ state _] @@ -80,14 +80,10 @@ tokenized-attributes (->> (map (fn [attr] {attr (:id token)}) attributes) (into {}))] (rx/of - (dch/update-shapes shape-ids (fn [shape] (update shape :applied-tokens merge tokenized-attributes))) - (when cb - (cb)) + (dch/update-shapes shape-ids (fn [shape] + (update shape :applied-tokens merge tokenized-attributes))) (when on-update-shape - (on-update-shape resolved-value shape-ids attributes)))) - #_(rx/of - (dch/update-shapes shape-ids #(assoc % :applied-tokens {:found 1}))))))))) - + (on-update-shape resolved-value shape-ids attributes)))))))))) (def remove-keys #(apply dissoc %1 %2))