From bb91c063907190c37ae420d3a8dfe88e546eda8c Mon Sep 17 00:00:00 2001 From: Dexterity <173429049+Dexterity104@users.noreply.github.com> Date: Tue, 21 Apr 2026 11:32:07 -0400 Subject: [PATCH] :bug: Show check icon after copying team invitation link (#8996) Co-authored-by: Andrey Antukh --- frontend/src/app/main/ui/dashboard/team.cljs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/dashboard/team.cljs b/frontend/src/app/main/ui/dashboard/team.cljs index 32e4b012c1..82a2c103d6 100644 --- a/frontend/src/app/main/ui/dashboard/team.cljs +++ b/frontend/src/app/main/ui/dashboard/team.cljs @@ -38,6 +38,7 @@ [app.util.dom :as dom] [app.util.forms :as uforms] [app.util.i18n :as i18n :refer [tr]] + [app.util.timers :as tm] [beicon.v2.core :as rx] [cuerdas.core :as str] [rumext.v2 :as mf])) @@ -613,7 +614,10 @@ {::mf/props :obj ::mf/private true} [{:keys [invitation team-id]}] - (let [email (:email invitation) + (let [email (:email invitation) + copied* (mf/use-state false) + copied? (deref copied*) + on-error (mf/use-fn (mf/deps email) @@ -639,6 +643,8 @@ on-copy-success (mf/use-fn (fn [] + (reset! copied* true) + (tm/schedule 1000 #(reset! copied* false)) (st/emit! (ntf/success (tr "notifications.invitation-link-copied")) (modal/hide)))) @@ -656,7 +662,7 @@ [:> icon-button* {:variant "ghost" :aria-label (tr "labels.copy-invitation-link") :on-click on-copy - :icon "clipboard"}])) + :icon (if copied? "tick" "clipboard")}])) (mf/defc invitation-row* {::mf/wrap [mf/memo]