ordering-ui-react-native 0.14.75 → 0.14.76

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.14.75",
3
+ "version": "0.14.76",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -110,7 +110,8 @@ const OrderProgressUI = (props: any) => {
110
110
  const deliveryTime = order?.delivery_datetime_utc
111
111
  ? parseDate(order?.delivery_datetime_utc, { outputFormat: 'YYYY-MM-DD HH:mm' })
112
112
  : parseDate(order?.delivery_datetime, { utc: false, outputFormat: 'YYYY-MM-DD HH:mm' })
113
- const [hour, minute] = time.split(':')
113
+ const hour = time?.split(':')?.[0]
114
+ const minute = time?.split(':')?.[1]
114
115
  const result = time ? (parseInt(hour, 10) * 60) + parseInt(minute, 10) : 0
115
116
  const returnedDate = moment(deliveryTime).add(result, 'minutes').format('hh:mm A')
116
117
  return returnedDate