Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onPress={async () => {
const product = this.state.offerings.current.annual.product.identifier;
try {
const purchaseMade = await Purchases.purchaseProduct(product);
checkIfPro(purchaseMade.purchaserInfo, this.props.navigation);
} catch (e) {
if (!e.userCancelled) {
// eslint-disable-next-line no-console
console.log(`Error handling ${JSON.stringify(e)}`);
} else {
// eslint-disable-next-line no-console
console.log(`User cancelled ${JSON.stringify(e)}`);
}
}
}}
title={this.state.proAnnualPrice}