ordering-ui-react-native 0.18.42 → 0.18.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.18.42",
3
+ "version": "0.18.44",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -5,6 +5,7 @@ import {
5
5
  useOrder,
6
6
  useLanguage
7
7
  } from 'ordering-components/native';
8
+ import FastImage from 'react-native-fast-image'
8
9
  import { StyleSheet, TouchableOpacity, View } from 'react-native';
9
10
  import { useTheme } from 'styled-components/native';
10
11
  import { OIcon, OText, OButton } from '../shared';
@@ -231,10 +232,13 @@ const SingleOrderCardUI = (props: SingleOrderCardParams) => {
231
232
  key={business?.id}
232
233
  style={styles.logoWrapper}
233
234
  >
234
- <OIcon
235
- url={optimizeImage(business?.logo, 'h_300,c_limit')}
236
- src={optimizeImage(!business?.logo && theme?.images?.dummies?.businessLogo, 'h_300,c_limit')}
235
+ <FastImage
237
236
  style={styles.minilogo}
237
+ source={business?.logo ? {
238
+ uri: optimizeImage(business?.logo, 'h_300,c_limit'),
239
+ priority: FastImage.priority.normal,
240
+ } : theme?.images?.dummies?.businessLogo}
241
+ resizeMode={FastImage.resizeMode.contain}
238
242
  />
239
243
  </Logo>
240
244
  ))}
@@ -244,10 +248,13 @@ const SingleOrderCardUI = (props: SingleOrderCardParams) => {
244
248
  </MultiLogosContainer>
245
249
  ) : (
246
250
  <Logo style={styles.logoWrapper}>
247
- <OIcon
248
- url={optimizeImage(order.business?.logo, 'h_300,c_limit')}
249
- src={optimizeImage(!order.business?.logo && theme?.images?.dummies?.businessLogo, 'h_300,c_limit')}
251
+ <FastImage
250
252
  style={styles.logo}
253
+ source={order.business?.logo ? {
254
+ uri: optimizeImage(order.business?.logo, 'h_300,c_limit'),
255
+ priority: FastImage.priority.normal,
256
+ } : theme?.images?.dummies?.businessLogo}
257
+ resizeMode={FastImage.resizeMode.contain}
251
258
  />
252
259
  </Logo>
253
260
  )}
@@ -296,7 +303,7 @@ const SingleOrderCardUI = (props: SingleOrderCardParams) => {
296
303
  </OText>
297
304
  </TouchableOpacity>
298
305
  )}
299
- {!hideReorderButton && order?.id === 'number' && (
306
+ {!hideReorderButton && typeof order?.id === 'number' && (
300
307
  <OButton
301
308
  text={t('REORDER', 'Reorder')}
302
309
  imgRightSrc={''}
@@ -19,7 +19,7 @@ export const CardInfoWrapper = styled.View`
19
19
 
20
20
  export const ContentHeader = styled.View`
21
21
  flex-direction: row;
22
- justify-content: space-between;
22
+ justify-content: flex-end;
23
23
  `
24
24
 
25
25
  export const ButtonWrapper = styled.View`