mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: redirect
This commit is contained in:
@@ -4,10 +4,21 @@ import { base } from '$app/paths';
|
||||
export function checkPricingRefAndRedirect(searchParams: URLSearchParams, shouldRegister = false) {
|
||||
if (searchParams.has('type')) {
|
||||
const paramType = searchParams.get('type');
|
||||
const hasPlan = searchParams.has('plan');
|
||||
if (paramType === 'create') {
|
||||
shouldRegister
|
||||
? goto(
|
||||
`${base}/register?type=create${hasPlan ? `&plan=${searchParams.get('plan')}` : ''}`
|
||||
)
|
||||
: goto(
|
||||
`${base}/create-organization?type=create${hasPlan ? `&plan=${searchParams.get('plan')}` : ''}`
|
||||
);
|
||||
}
|
||||
//Legacy
|
||||
if (paramType === 'createPro') {
|
||||
shouldRegister
|
||||
? goto(`${base}/register?type=createPro`)
|
||||
: goto(`${base}/create-organization?type=createPro`);
|
||||
? goto(`${base}/register?type=create&plan=tier-1`)
|
||||
: goto(`${base}/create-organization?type=create&plan=tier-1`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,13 +79,6 @@
|
||||
billingPlan = plan as BillingPlan;
|
||||
}
|
||||
}
|
||||
if (
|
||||
anyOrgFree ||
|
||||
($page.url.searchParams.has('type') &&
|
||||
$page.url.searchParams.get('type') === 'createPro')
|
||||
) {
|
||||
billingPlan = BillingPlan.PRO;
|
||||
}
|
||||
});
|
||||
|
||||
async function loadPaymentMethods() {
|
||||
|
||||
Reference in New Issue
Block a user