-
-
Save wbobeirne/3b05d0dc4910df6c9ac9fdb7e26635a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private checkIfPaid = () => { | |
setTimeout(() => { | |
const { pendingPost } = this.state; | |
if (!pendingPost) return; | |
api.getPost(pendingPost.id).then(p => { | |
if (p.hasPaid) { | |
window.location.reload(); | |
} else { | |
this.checkIfPaid(); | |
} | |
}); | |
}, 1000); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment