From 9123491f0ca59e3fd1cf8a3d57c924514d4a95ef Mon Sep 17 00:00:00 2001 From: Vladislav Nikov <37351107+vladislav1nikov@users.noreply.github.com> Date: Fri, 22 Nov 2019 11:18:00 +0200 Subject: [PATCH] Update RateModal.tsx Prior to this change, the rating window did not close when redirected to the market --- src/Components/RateModal.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Components/RateModal.tsx b/src/Components/RateModal.tsx index 0b4ed09..b7e838a 100644 --- a/src/Components/RateModal.tsx +++ b/src/Components/RateModal.tsx @@ -172,6 +172,7 @@ export class RateModal extends Component { Platform.OS === 'ios' ? Linking.openURL(iTunesStoreUrl) : Linking.openURL(playStoreUrl); + this.setState({ isModalOpen: false }); } else { this.setState({ showContactForm: true }); } @@ -181,7 +182,13 @@ export class RateModal extends Component { const { sendContactUsForm } = this.props; if (this.state.review.length > 0) { if (sendContactUsForm && typeof sendContactUsForm === 'function') { - return sendContactUsForm({ ...this.state }); + this.setState({ showContactForm: false }); + let copyState = this.state; + this.setState({ + review: '', + reviewError: false + }); + return sendContactUsForm({ ...copyState }); } throw new Error('You should generate sendContactUsForm function'); } else {