feat: upgrade cta (#1655)

This commit is contained in:
Aman Harwara
2022-09-27 18:29:50 +05:30
committed by GitHub
parent f3f7f9d362
commit ec52e5684d
4 changed files with 63 additions and 3 deletions

View File

@@ -20,7 +20,14 @@ export const loadPurchaseFlowUrl = async (application: WebApplication): Promise<
const period = params.get('period') ? `&period=${params.get('period')}` : ''
const plan = params.get('plan') ? `&plan=${params.get('plan')}` : ''
if (url) {
window.location.assign(`${url}${period}${plan}`)
const finalUrl = `${url}${period}${plan}`
if (application.isNativeMobileWeb()) {
application.mobileDevice.openUrl(finalUrl)
} else {
window.location.assign(finalUrl)
}
return true
}
return false