From b65a0132355a0776619bc344cf4510c9ff46f534 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 21 Nov 2023 16:39:45 +0100 Subject: [PATCH] :bug: Prevent full dashboard state refetch on toggle visibility of templates --- frontend/src/app/main/ui.cljs | 3 ++- frontend/src/app/main/ui/dashboard.cljs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui.cljs b/frontend/src/app/main/ui.cljs index 2777c0d4a..38f3e1f3e 100644 --- a/frontend/src/app/main/ui.cljs +++ b/frontend/src/app/main/ui.cljs @@ -108,7 +108,8 @@ (not= "0.0" (:main cf/version))) [:& app.main.ui.releases/release-notes-modal {:version (:main cf/version)}])) - [:& dashboard {:route route :profile profile}]] + (when profile + [:& dashboard {:route route :profile profile}])] :viewer (let [{:keys [query-params path-params]} route diff --git a/frontend/src/app/main/ui/dashboard.cljs b/frontend/src/app/main/ui/dashboard.cljs index 85c236b38..22fd5d524 100644 --- a/frontend/src/app/main/ui/dashboard.cljs +++ b/frontend/src/app/main/ui/dashboard.cljs @@ -154,7 +154,7 @@ (hooks/use-shortcuts ::dashboard sc/shortcuts) - (mf/with-effect [profile team-id] + (mf/with-effect [team-id] (st/emit! (dd/initialize {:id team-id})) (fn [] (st/emit! (dd/finalize {:id team-id}))))