From 51f924a5e1f870e5760b386fdc4604cc4947e218 Mon Sep 17 00:00:00 2001 From: Alonso Torres Date: Wed, 12 Feb 2025 13:09:37 +0100 Subject: [PATCH] :bug: Fix problem with onboarding team invite (#5829) Co-authored-by: Andrey Antukh --- CHANGES.md | 1 + frontend/src/app/main/ui/onboarding/newsletter.cljs | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index fcba446e26..bdc1b9799e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -62,6 +62,7 @@ is a number of cores) - Added upload svg with images method [#5489](https://github.com/penpot/penpot/issues/5489) - Fix problem with root frame parent reference [Taiga #9437](https://tree.taiga.io/project/penpot/issue/9437) - Fix change flex direction using plugins API [Taiga #9407](https://tree.taiga.io/project/penpot/issue/9407) +- Fix problem with onboarding to a team [Taiga #10143](https://tree.taiga.io/project/penpot/issue/10143) - Fix problem with grid layout crashing [Taiga #10127](https://tree.taiga.io/project/penpot/issue/10127) ## 2.4.3 diff --git a/frontend/src/app/main/ui/onboarding/newsletter.cljs b/frontend/src/app/main/ui/onboarding/newsletter.cljs index a501659f29..62a41d00c0 100644 --- a/frontend/src/app/main/ui/onboarding/newsletter.cljs +++ b/frontend/src/app/main/ui/onboarding/newsletter.cljs @@ -10,6 +10,7 @@ [app.main.data.event :as-alias ev] [app.main.data.notifications :as ntf] [app.main.data.profile :as du] + [app.main.refs :as refs] [app.main.store :as st] [app.main.ui.icons :as i] [app.util.dom :as dom] @@ -22,6 +23,7 @@ (let [state* (mf/use-state #(do {:newsletter-updates false :newsletter-news false})) state (deref state*) + team (mf/deref refs/team) on-change (mf/use-fn @@ -33,7 +35,7 @@ on-next (mf/use-fn - (mf/deps state) + (mf/deps state team) (fn [] (when (or (:newsletter-updates state) (:newsletter-news state)) @@ -44,7 +46,10 @@ (assoc :label "newsletter:subscriptions") (assoc :step 6))] (st/emit! (ptk/data-event ::ev/event params) - (du/update-profile-props state)))))] + (du/update-profile-props + (cond-> state + (not (:is-default team)) + (assoc :onboarding-viewed true)))))))] [:div {:class (stl/css-case :modal-overlay true)}