ordering-ui-react-native 0.18.51 → 0.18.53

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.51",
3
+ "version": "0.18.53",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -70,11 +70,17 @@ export const LottieAnimation = (props: Props) => {
70
70
  style={style}
71
71
  >
72
72
  {type === 'favorite' ? (
73
- <Lottie
74
- ref={favRef}
75
- progress={initialValue}
76
- style={{ width: 20, height: 20 }}
77
- source={animationGif}
73
+ // <Lottie
74
+ // ref={favRef}
75
+ // progress={initialValue}
76
+ // style={{ width: 20, height: 20 }}
77
+ // source={animationGif}
78
+ // />
79
+ <IconAntDesign
80
+ name={isActive ? icon[0] : icon[1]}
81
+ color={iconProps?.color || theme.colors.danger5}
82
+ size={iconProps?.size || 16}
83
+ style={iconProps?.style}
78
84
  />
79
85
  ) : (
80
86
  <>
@@ -4,6 +4,7 @@ import { ScrollView, StyleSheet, View } from 'react-native'
4
4
  import { useLanguage, useUtils } from 'ordering-components/native'
5
5
  import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'
6
6
  import { OText, OButton } from '../shared'
7
+ import { formatSeconds } from '../../utils'
7
8
 
8
9
  export const OrderHistory = (props: any) => {
9
10
  const {
@@ -61,7 +62,7 @@ export const OrderHistory = (props: any) => {
61
62
  20: 'ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS',
62
63
  21: 'ORDER_CUSTOMER_ARRIVED_BUSINESS',
63
64
  22: 'ORDER_LOOKING_FOR_DRIVER',
64
- 23: 'ORDER_DRIVER_ON_WAY'
65
+ 23: 'ORDER_DRIVER_ON_WAY'
65
66
  }
66
67
 
67
68
  const getLogisticTagStatus = (status: any) => {
@@ -128,12 +129,18 @@ export const OrderHistory = (props: any) => {
128
129
  <OText
129
130
  size={14}
130
131
  weight='bold'
131
- numberOfLines={1}
132
+ numberOfLines={message.change?.attribute === 'delivered_in' ? 2 : 1}
132
133
  ellipsizeMode='tail'
133
134
  >
134
135
  {message.change?.attribute === 'logistic_status'
135
136
  ? getLogisticTagStatus(parseInt(message.change.new, 10))
136
- : t(ORDER_STATUS[parseInt(message.change.new, 10)])
137
+ : message.change?.attribute === 'delivered_in' ? (
138
+ <>
139
+ {t('TIME_ADDED_BY_DRIVER', 'Time added by driver')}{'\n'}
140
+ {formatSeconds(parseInt(message.change.new, 10))}
141
+ </>
142
+ )
143
+ : t(ORDER_STATUS[parseInt(message.change.new, 10)])
137
144
  }
138
145
  </OText>
139
146
  ) : (