fix(mobile): show premium modal on iOS
This commit is contained in:
@@ -15,7 +15,11 @@ const NoSubscription: FunctionComponent<Props> = ({ application }) => {
|
||||
const errorMessage = 'There was an error when attempting to redirect you to the subscription page.'
|
||||
setIsLoadingPurchaseFlow(true)
|
||||
try {
|
||||
application.openPurchaseFlow()
|
||||
if (application.isNativeIOS()) {
|
||||
application.showPremiumModal()
|
||||
} else {
|
||||
application.openPurchaseFlow()
|
||||
}
|
||||
} catch (e) {
|
||||
setPurchaseFlowError(errorMessage)
|
||||
} finally {
|
||||
|
||||
@@ -15,7 +15,11 @@ const NoProSubscription: FunctionComponent<Props> = ({ application }) => {
|
||||
const errorMessage = 'There was an error when attempting to redirect you to the subscription page.'
|
||||
setIsLoadingPurchaseFlow(true)
|
||||
try {
|
||||
application.openPurchaseFlow()
|
||||
if (application.isNativeIOS()) {
|
||||
application.showPremiumModal()
|
||||
} else {
|
||||
application.openPurchaseFlow()
|
||||
}
|
||||
} catch (e) {
|
||||
setPurchaseFlowError(errorMessage)
|
||||
} finally {
|
||||
|
||||
@@ -42,12 +42,20 @@ const HelpAndFeedback = ({ application }: { application: WebApplication }) => {
|
||||
</a>
|
||||
</Text>
|
||||
{application.isNativeIOS() && (
|
||||
<LinkButton
|
||||
className="mt-3"
|
||||
label="Privacy Policy"
|
||||
link="https://standardnotes.com/privacy"
|
||||
onClick={handleClick}
|
||||
/>
|
||||
<>
|
||||
<LinkButton
|
||||
className="mt-3"
|
||||
label="Privacy Policy"
|
||||
link="https://standardnotes.com/privacy"
|
||||
onClick={handleClick}
|
||||
/>
|
||||
<LinkButton
|
||||
className="mt-3"
|
||||
label="Terms of Use"
|
||||
link="https://www.apple.com/legal/internet-services/itunes/dev/stdeula/"
|
||||
onClick={handleClick}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</PreferencesSegment>
|
||||
<HorizontalSeparator classes="my-4" />
|
||||
|
||||
Reference in New Issue
Block a user