Add callback to nitrate billing url

This commit is contained in:
Marina López 2026-04-14 11:45:55 +02:00
parent de577a803c
commit c63b9583a2

View File

@ -65,9 +65,12 @@
[] []
(st/emit! (rt/nav-raw :href "/control-center/?action=create-org"))) (st/emit! (rt/nav-raw :href "/control-center/?action=create-org")))
(def go-to-subscription-url (u/join cf/public-uri "#/settings/subscriptions"))
(defn go-to-nitrate-billing (defn go-to-nitrate-billing
[] []
(st/emit! (rt/nav-raw :href "/control-center/licenses/billing"))) (let [href (dm/str "/control-center/licenses/billing?callback=" (js/encodeURIComponent go-to-subscription-url))]
(st/emit! (rt/nav-raw :href href))))
(defn go-to-buy-nitrate-license (defn go-to-buy-nitrate-license
([subscription] ([subscription]
@ -78,8 +81,6 @@
href (dm/str "/control-center/licenses/start?" (u/map->query-string params))] href (dm/str "/control-center/licenses/start?" (u/map->query-string params))]
(st/emit! (rt/nav-raw :href href))))) (st/emit! (rt/nav-raw :href href)))))
(def go-to-subscription-url (u/join cf/public-uri "#/settings/subscriptions"))
(defn is-valid-license? (defn is-valid-license?
[profile] [profile]
(and (contains? cf/flags :nitrate) (and (contains? cf/flags :nitrate)