mirror of
https://github.com/penpot/penpot.git
synced 2026-07-21 13:37:49 +00:00
🐛 Fix modals for nitrate subscription when unlimited (#10690)
This commit is contained in:
parent
c119622ad9
commit
167aa7410f
@ -315,8 +315,14 @@
|
||||
(mf/use-fn
|
||||
(mf/deps profile)
|
||||
(fn []
|
||||
(if (dnt/is-valid-license? profile)
|
||||
(cond
|
||||
(= (get-subscription-type (-> profile :props :subscription)) "unlimited")
|
||||
(st/emit! (dnt/show-nitrate-popup :nitrate-form {:show-contact-sales-option true}))
|
||||
|
||||
(dnt/is-valid-license? profile)
|
||||
(dnt/go-to-nitrate-ac-create-org)
|
||||
|
||||
:else
|
||||
(st/emit! (dnt/show-nitrate-popup :nitrate-form)))))
|
||||
|
||||
on-go-to-cc-click
|
||||
@ -755,8 +761,14 @@
|
||||
(mf/use-fn
|
||||
(mf/deps profile)
|
||||
(fn []
|
||||
(if (dnt/is-valid-license? profile)
|
||||
(cond
|
||||
(= (get-subscription-type (-> profile :props :subscription)) "unlimited")
|
||||
(st/emit! (dnt/show-nitrate-popup :nitrate-form {:show-contact-sales-option true}))
|
||||
|
||||
(dnt/is-valid-license? profile)
|
||||
(dnt/go-to-nitrate-ac-create-org)
|
||||
|
||||
:else
|
||||
(st/emit! (dnt/show-nitrate-popup :nitrate-form)))))]
|
||||
(if show-dropdown?
|
||||
[:div {:class (stl/css :sidebar-org-switch)}
|
||||
|
||||
@ -162,11 +162,11 @@
|
||||
|
||||
handle-click
|
||||
(mf/use-fn
|
||||
(mf/deps nitrate-license subscription-type)
|
||||
(mf/deps subscription-type)
|
||||
(fn []
|
||||
(if (= subscription-type "unlimited")
|
||||
(st/emit! (dnt/show-nitrate-popup :nitrate-dialog {:nitrate-license nitrate-license :show-contact-sales-option true}))
|
||||
(st/emit! (dnt/show-nitrate-popup :nitrate-form)))))
|
||||
(st/emit! (dnt/show-nitrate-popup :nitrate-form
|
||||
(when (= subscription-type "unlimited")
|
||||
{:show-contact-sales-option true})))))
|
||||
|
||||
handle-go-to-cc
|
||||
(mf/use-fn dnt/go-to-nitrate-ac-create-org)
|
||||
|
||||
@ -24,7 +24,8 @@
|
||||
::mf/wrap-props true}
|
||||
[connectivity]
|
||||
|
||||
(let [online? (:licenses connectivity)
|
||||
(let [show-contact-sales-option (:show-contact-sales-option connectivity)
|
||||
online? (and (:licenses connectivity) (not show-contact-sales-option))
|
||||
profile (mf/deref refs/profile)
|
||||
on-click
|
||||
(mf/use-fn
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user