ordering-ui-react-native 0.24.13 → 0.24.14

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.24.13",
3
+ "version": "0.24.14",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -88,12 +88,8 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
88
88
  }
89
89
 
90
90
  const getFormattedSubOptionName = ({ quantity, name, position, price }: any) => {
91
- if (name !== 'No') {
92
- const pos = position ? `(${position})` : '';
93
- return `${quantity} x ${name} ${pos} +${price}`
94
- } else {
95
- return 'No';
96
- }
91
+ const pos = position ? `(${position})` : ''
92
+ return `${quantity} x ${name} ${pos} +${price}`
97
93
  };
98
94
 
99
95
  /*useEffect(() => {
@@ -284,7 +280,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
284
280
  suboption.position,
285
281
  )
286
282
  : '',
287
- price: parsePrice(suboption.price, { currency: getCurrenySymbol(currency) }),
283
+ price: (['left', 'right'].includes(suboption.position)) ? parsePrice(suboption.half_price ?? suboption.price, { currency: getCurrenySymbol(currency) }) : parsePrice(suboption.price, { currency: getCurrenySymbol(currency) }),
288
284
  })}
289
285
  </OText>
290
286
  </ProductSubOption>