ordering-ui-react-native 0.23.74-test → 0.23.74-test2

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.23.74-test",
3
+ "version": "0.23.74-test2",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -274,14 +274,14 @@ const MapViewComponent = (props: MapViewParams) => {
274
274
  onTouchStart={() => (following.current = false)}
275
275
  >
276
276
  <>
277
- {Object.values(markerGroups).map((marker: any) => (
277
+ {Object.values(markerGroups).length && Object.values(markerGroups).map((marker: any) => (
278
278
  <RenderMarker
279
279
  key={marker[0]?.business_id}
280
280
  marker={marker[0]}
281
281
  orderIds={marker.map((order: any) => order.id).join(', ')}
282
282
  />
283
283
  ))}
284
- {Object.values(customerMarkerGroups).map((marker: any) => (
284
+ {Object.values(customerMarkerGroups).length && Object.values(customerMarkerGroups).map((marker: any) => (
285
285
  <RenderMarker
286
286
  key={marker[0]?.customer_id}
287
287
  marker={marker[0]}
@@ -301,14 +301,16 @@ const MapViewComponent = (props: MapViewParams) => {
301
301
  size={50}
302
302
  color={theme.colors.primary}
303
303
  />
304
- <View style={styles.view}>
305
- <OIcon
306
- style={styles.image}
307
- src={{ uri: user.photo }}
308
- width={25}
309
- height={25}
310
- />
311
- </View>
304
+ {user?.photo && (
305
+ <View style={styles.view}>
306
+ <OIcon
307
+ style={styles.image}
308
+ src={{ uri: user.photo }}
309
+ width={25}
310
+ height={25}
311
+ />
312
+ </View>
313
+ )}
312
314
  </Marker>
313
315
  </>
314
316
  </MapView>