ordering-ui-react-native 0.17.43 → 0.17.44

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.17.43",
3
+ "version": "0.17.44",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -151,6 +151,8 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
151
151
  }
152
152
  }, [scrollref?.current])
153
153
 
154
+ const customerName = `${order?.customer?.name ?? ''} ${order?.customer?.middle_name ?? ''} ${order?.customer?.lastname ?? ''} ${order?.customer?.second_lastname ?? ''}`?.replace(' ', ' ')?.trim() ?? ''
155
+
154
156
  return (
155
157
  <KeyboardAvoidingView
156
158
  enabled
@@ -206,20 +208,20 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
206
208
  style={{ borderRadius: 7.6 }}
207
209
  />
208
210
  </View>
209
- <OText
211
+ {!!customerName && <OText
210
212
  size={14}
211
213
  weight="500"
212
214
  style={{
213
215
  marginTop: 16
214
216
  }}
215
217
  >
216
- {order?.customer?.name ?? ''} {order?.customer?.middle_name ?? ''} {order?.customer?.lastname ?? ''} {order?.customer?.second_lastname ?? ''}
217
- </OText>
218
+ {customerName}
219
+ </OText>}
218
220
  </CustomerInfoContainer>
219
221
  <OText
220
222
  size={12}
221
223
  >
222
- {t('HOW_WAS_YOUR_CUSTOMER', 'How was your experience with _name_?').replace('_name_', `${order?.customer?.name ?? ''} ${order?.customer?.middle_name ?? ''} ${order?.customer?.lastname ?? ''} ${order?.customer?.second_lastname ?? ''}`)}
224
+ {customerName ? t('HOW_WAS_YOUR_CUSTOMER', 'How was your experience with _name_?').replace('_name_', customerName) : t('HOW_WAS_YOUR_NO_CUSTOMER', 'How was your experience?')}
223
225
  </OText>
224
226
  <RatingBarContainer>
225
227
  <LinearGradient