From c63b9583a2985e004aebef50dee4f4b3592b232d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marina=20L=C3=B3pez?= Date: Tue, 14 Apr 2026 11:45:55 +0200 Subject: [PATCH] :sparkles: Add callback to nitrate billing url --- frontend/src/app/main/data/nitrate.cljs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/data/nitrate.cljs b/frontend/src/app/main/data/nitrate.cljs index d4f4ed533c..6c53126cec 100644 --- a/frontend/src/app/main/data/nitrate.cljs +++ b/frontend/src/app/main/data/nitrate.cljs @@ -65,9 +65,12 @@ [] (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 [] - (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 ([subscription] @@ -78,8 +81,6 @@ href (dm/str "/control-center/licenses/start?" (u/map->query-string params))] (st/emit! (rt/nav-raw :href href))))) -(def go-to-subscription-url (u/join cf/public-uri "#/settings/subscriptions")) - (defn is-valid-license? [profile] (and (contains? cf/flags :nitrate)