ordering-ui-react-native 0.18.57 → 0.18.58

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.18.57",
3
+ "version": "0.18.58",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -281,7 +281,9 @@ const CartUI = (props: any) => {
281
281
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_1' })}>
282
282
  <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
283
283
  </TouchableOpacity>
284
- <OfferAlert offerId={offer?.id} />
284
+ {!!offer?.id && (
285
+ <OfferAlert offerId={offer?.id} />
286
+ )}
285
287
  </OSRow>
286
288
  <OText size={12} lineHeight={18}>
287
289
  - {parsePrice(offer?.summary?.discount)}
@@ -343,7 +345,7 @@ const CartUI = (props: any) => {
343
345
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })}>
344
346
  <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
345
347
  </TouchableOpacity>
346
- {!offer?.type && (
348
+ {!offer?.type && !!offer?.id && (
347
349
  <OfferAlert offerId={offer?.id} />
348
350
  )}
349
351
  </OSRow>
@@ -370,7 +372,9 @@ const CartUI = (props: any) => {
370
372
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_2' })}>
371
373
  <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
372
374
  </TouchableOpacity>
373
- <OfferAlert offerId={offer?.id} />
375
+ {!!offer?.id && (
376
+ <OfferAlert offerId={offer?.id} />
377
+ )}
374
378
  </OSRow>
375
379
  <OText size={12} lineHeight={18}>
376
380
  - {parsePrice(offer?.summary?.discount)}
@@ -169,7 +169,9 @@ const OrderSummaryUI = (props: any) => {
169
169
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_1' })}>
170
170
  <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
171
171
  </TouchableOpacity>
172
- <OfferAlert offerId={offer?.id} />
172
+ {!!offer?.id && (
173
+ <OfferAlert offerId={offer?.id} />
174
+ )}
173
175
  </OSRow>
174
176
  <OText size={12}>
175
177
  - {parsePrice(offer?.summary?.discount)}
@@ -233,7 +235,9 @@ const OrderSummaryUI = (props: any) => {
233
235
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_3' })}>
234
236
  <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
235
237
  </TouchableOpacity>
236
- <OfferAlert offerId={offer?.id} />
238
+ {!!offer?.id && (
239
+ <OfferAlert offerId={offer?.id} />
240
+ )}
237
241
  </OSRow>
238
242
  <OText size={12}>
239
243
  - {parsePrice(offer?.summary?.discount)}
@@ -258,7 +262,9 @@ const OrderSummaryUI = (props: any) => {
258
262
  <TouchableOpacity style={{ marginLeft: 3 }} onPress={() => setOpenTaxModal({ open: true, data: offer, type: 'offer_target_2' })}>
259
263
  <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
260
264
  </TouchableOpacity>
261
- <OfferAlert offerId={offer?.id} />
265
+ {!!offer?.id && (
266
+ <OfferAlert offerId={offer?.id} />
267
+ )}
262
268
  </OSRow>
263
269
  <OText size={12}>
264
270
  - {parsePrice(offer?.summary?.discount)}