Fix integrations checkout without org

This commit is contained in:
Ishaan Gupta 2026-06-10 22:02:26 +05:30
parent be59327edf
commit 5e45c36303

View file

@ -2427,6 +2427,12 @@ export function IntegrationsView({
const handleUpgrade = async (planId?: unknown) => {
const checkoutPlanId = planId === "api_max" ? "api_max" : "api_pro"
if (publicMode || !org) {
const loginUrl = new URL("/login", window.location.origin)
loginUrl.searchParams.set("redirect", window.location.href)
window.location.assign(loginUrl.toString())
return
}
try {
const result = await autumn.attach({
planId: checkoutPlanId,