muba-posting 4.2.1 → 4.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/Preview.js +5 -4
  2. package/package.json +1 -1
package/Preview.js CHANGED
@@ -20,7 +20,8 @@ export default class Preview extends React.Component {
20
20
  premiumActive: false,
21
21
  superPremiumActive: false,
22
22
  remaining: 0,
23
- product: ''
23
+ product: '',
24
+ showPaymentOnline: false
24
25
  }
25
26
  }
26
27
 
@@ -30,8 +31,8 @@ export default class Preview extends React.Component {
30
31
  if (this.state.minHeight != minHeight) {
31
32
  this.setState({ minHeight: minHeight })
32
33
  }
33
- const paymentOnlineActive = await this.props.request(this, PAYMENT_ONLINE_ACTIVE, { regionId: this.props.postingAd.regionId });
34
- console.log(paymentOnlineActive)
34
+ const paymentOnlineActive = await this.props.request(this, PAYMENT_ONLINE_ACTIVE, { regionId: this.props.postingAd.region });
35
+ this.setState({ showPaymentOnline: paymentOnlineActive.value === 'true' });
35
36
  this.refreshData();
36
37
  }
37
38
 
@@ -187,7 +188,7 @@ export default class Preview extends React.Component {
187
188
  </View>
188
189
  </View>
189
190
  }
190
- {!this.props.businessId ?
191
+ {!this.props.businessId && this.state.showPaymentOnline ?
191
192
  <View style={commonStyles.previewHighlightContainer}>
192
193
  <TouchableOpacity style={[commonStyles.previewHighlightButton, commonStyles.alignCenter]} activeOpacity={0.5} onPress={() => this.props.highlight()}>
193
194
  <Image style={commonStyles.previewHighlightImage} source={require('./assets/images/sparks.png')} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-posting",
3
- "version": "4.2.1",
3
+ "version": "4.2.2",
4
4
  "description": "Posting",
5
5
  "main": "Posting.js",
6
6
  "scripts": {