mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
14 lines
478 B
TypeScript
14 lines
478 B
TypeScript
import { goto } from '$app/navigation';
|
|
import { base } from '$app/paths';
|
|
|
|
export function checkPricingRefAndRedirect(searchParams: URLSearchParams, shouldRegister = false) {
|
|
if (searchParams.has('type')) {
|
|
const paramType = searchParams.get('type');
|
|
if (paramType === 'createPro') {
|
|
shouldRegister
|
|
? goto(`${base}/register?type=createPro`)
|
|
: goto(`${base}/create-organization?type=createPro`);
|
|
}
|
|
}
|
|
}
|