From 7e5b10eb3edb81b7300851d569ba95fa6c017ebc Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 24 Nov 2021 12:45:06 +0100 Subject: [PATCH] :bug: Fix team deletion flow on dashboard. --- frontend/src/app/main/ui/dashboard/sidebar.cljs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/ui/dashboard/sidebar.cljs b/frontend/src/app/main/ui/dashboard/sidebar.cljs index d77ad0f93..efdd15d7b 100644 --- a/frontend/src/app/main/ui/dashboard/sidebar.cljs +++ b/frontend/src/app/main/ui/dashboard/sidebar.cljs @@ -304,6 +304,11 @@ (st/emit! (dd/go-to-projects (:default-team-id profile)) (dd/leave-team (with-meta params {:on-success on-leaved-success}))))) + delete-fn + (fn [] + (st/emit! (dd/go-to-projects (:default-team-id profile)) + (dd/delete-team (with-meta team {:on-success on-leaved-success})))) + on-leave-clicked (st/emitf (modal/show {:type :confirm @@ -321,9 +326,6 @@ :team team :accept leave-and-reassign-fn}))) - delete-fn - (st/emitf (dd/delete-team (with-meta team {:on-success on-leaved-success}))) - on-delete-clicked (st/emitf (modal/show