Skip to content

Instantly share code, notes, and snippets.

@SimonHoiberg
Created June 19, 2020 15:00
Show Gist options
  • Save SimonHoiberg/104075d471e0648cb8a2847317790192 to your computer and use it in GitHub Desktop.
Save SimonHoiberg/104075d471e0648cb8a2847317790192 to your computer and use it in GitHub Desktop.
const handleCancelSubscription = (end: boolean) => async () => {
try {
const subscription = await StripeManager.handleSubscription(user.subscriptionID, end);
setSubscription(subscription);
} catch (error) {
// Let the user know that something went wrong here...
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment