🐛 Restore the ability to enable or disable onboarding modal with flags

This commit is contained in:
Andrey Antukh 2023-11-21 16:38:48 +01:00
parent a147009e81
commit 243ce3650f
5 changed files with 28 additions and 20 deletions

View file

@ -212,11 +212,15 @@
skip
(mf/use-fn
#(st/emit! (modal/hide)
(if (contains? cf/flags :newsletter-subscription)
(modal/show {:type :onboarding-newsletter-modal})
(modal/show {:type :onboarding-team}))
(du/mark-onboarding-as-viewed)))]
(fn []
(st/emit! (modal/hide)
(du/mark-onboarding-as-viewed))
(cond
(contains? cf/flags :onboarding-newsletter)
(modal/show! {:type :onboarding-newsletter-modal})
(contains? cf/flags :onboarding-team)
(modal/show! {:type :onboarding-team}))))]
(mf/with-effect [@slide]
(when (not= :start @slide)
@ -225,6 +229,7 @@
(fn []
(reset! klass nil)
(tm/dispose! sem))))
(if new-css-system
[:div {:class (stl/css :modal-overlay)}
[:div.animated {:class(dm/str @klass " " (stl/css :animated))}
@ -232,8 +237,6 @@
:start [:& onboarding-welcome {:next #(navigate :opensource)}]
:opensource [:& onboarding-before-start {:next skip}])]]
[:div.modal-overlay
[:div.animated {:class @klass}
(case @slide