ordering-ui-react-native 0.21.78 → 0.21.79

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.21.78",
3
+ "version": "0.21.79",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -118,7 +118,7 @@ export const OrderSummary = ({ order, navigation, orderStatus, askBluetoothPermi
118
118
  : parseDate(order?.delivery_datetime, { utc: false })
119
119
  }
120
120
  </br>
121
- ${paymethodsLength > 1 ? 'PAYMENT_METHODS' : 'PAYMENT_METHOD'}: ${handlePaymethodsListString()}
121
+ ${t(paymethodsLength > 1 ? 'PAYMENT_METHODS' : 'PAYMENT_METHOD', paymethodsLength > 1 ? 'Payment methods' : 'Payment method')}: ${handlePaymethodsListString()}
122
122
  </p>
123
123
 
124
124
  <h1>${t('CUSTOMER_DETAILS', 'Customer details')}</h1>
@@ -72,7 +72,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
72
72
 
73
73
  const getProductPrice = (product: any) => {
74
74
  let subOptionPrice = 0;
75
- if (product?.options?.length > 0 && product?.options?.suboptions?.length > 0) {
75
+ if (product?.options?.length > 0 && product?.options[0]?.suboptions?.length > 0) {
76
76
  for (const option of product?.options) {
77
77
  for (const suboption of option?.suboptions) {
78
78
  subOptionPrice += suboption.quantity * suboption.price;
@@ -118,7 +118,7 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
118
118
 
119
119
  const onTextLayout = useCallback((e: any) => {
120
120
  setLengthMore((e.nativeEvent.lines.length == 2 && e.nativeEvent.lines[1].width > WIDTH_SCREEN * .76) || e.nativeEvent.lines.length > 2); //to check the text is more than 2 lines or not
121
- },[]);
121
+ }, []);
122
122
 
123
123
  return (
124
124
  <AccordionSection>