fix(mobile): show premium modal on iOS

This commit is contained in:
Mo
2022-11-15 09:29:59 -06:00
parent d65abb9a49
commit e962e9c745
9 changed files with 69 additions and 31 deletions

View File

@@ -13,11 +13,19 @@ const UpgradeNow = ({ application, featuresController, subscriptionContoller }:
const shouldShowCTA = !featuresController.hasFolders
const hasAccount = subscriptionContoller.hasAccount
const onClick = () => {
if (application.isNativeIOS()) {
application.showPremiumModal()
} else {
application.openPurchaseFlow()
}
}
return shouldShowCTA ? (
<div className="flex h-full items-center px-2">
<button
className="rounded bg-info py-0.5 px-1.5 text-sm font-bold uppercase text-info-contrast hover:brightness-125 lg:text-xs"
onClick={() => application.openPurchaseFlow()}
onClick={onClick}
>
{hasAccount ? 'Unlock features' : 'Sign up to sync'}
</button>