From 63524dce8dc095b91843eb27131e80a94077a7d9 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 18 Feb 2025 12:37:04 +0100 Subject: [PATCH] :bug: Fix regression on request-access dialog --- frontend/src/app/main/ui/static.cljs | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/frontend/src/app/main/ui/static.cljs b/frontend/src/app/main/ui/static.cljs index 01201f1ad..ebe78c50d 100644 --- a/frontend/src/app/main/ui/static.cljs +++ b/frontend/src/app/main/ui/static.cljs @@ -463,14 +463,13 @@ (let [type (:type data) path (:path route) - query-params (:query-params route) - path-params (:path-params route) + params (:query-params route) workspace? (str/includes? path "workspace") dashboard? (str/includes? path "dashboard") view? (str/includes? path "view") - ;; We stora the request access info int this state + ;; We store the request access info int this state info* (mf/use-state nil) info (deref info*) @@ -478,22 +477,22 @@ request-access? (and - (or (= (:type data) :not-found) (= (:type data) :authentication)) + (or (= (:type data) :not-found) + (= (:type data) :authentication)) (or workspace? dashboard? view?) (or (:file-id info) (:team-id info)))] - (mf/with-effect [type path query-params path-params] - (let [query-params (u/map->query-string query-params) - event-params {::ev/name "exception-page" - :type type - :path path - :query-params query-params}] - (st/emit! (ptk/event ::ev/event event-params)))) + (mf/with-effect [type path params] + (st/emit! (ptk/data-event ::ev/event + {::ev/name "exception-page" + :type type + :path path + :params (u/map->query-string params)}))) - (mf/with-effect [path-params info] + (mf/with-effect [params info] (when-not (:loaded info) - (->> (load-info path-params) + (->> (load-info params) (rx/subs! (partial reset! info*))))) (when loaded?