ordering-ui-react-native 0.20.1-release → 0.20.2-release

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.20.1-release",
3
+ "version": "0.20.2-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,27 +1,37 @@
1
1
  import React from 'react';
2
2
  import FastImage from 'react-native-fast-image'
3
- import { StyleSheet, TouchableOpacity, View } from 'react-native';
3
+ import { StyleSheet, TouchableOpacity, useWindowDimensions } from 'react-native';
4
4
  import {
5
5
  AddressDetails as AddressDetailsController,
6
6
  useOrder,
7
7
  useLanguage,
8
8
  } from 'ordering-components/native';
9
+ import { useTheme } from 'styled-components/native';
9
10
 
10
11
  import { ADContainer, ADHeader, ADAddress, ADMap } from './styles';
11
-
12
- import { useTheme } from 'styled-components/native';
13
- import { OText, OIcon } from '../shared';
14
- import { useWindowDimensions } from 'react-native';
12
+ import { OText } from '../shared';
13
+ import { getTypesText } from '../../utils';
15
14
 
16
15
  const AddressDetailsUI = (props: any) => {
17
- const { navigation, addressToShow, isCartPending, googleMapsUrl, apiKey } =
18
- props;
16
+ const {
17
+ navigation,
18
+ addressToShow,
19
+ isCartPending,
20
+ googleMapsUrl,
21
+ apiKey
22
+ } = props;
19
23
 
20
24
  const theme = useTheme();
21
25
  const [orderState] = useOrder();
26
+ const [{ options }] = useOrder();
22
27
  const [, t] = useLanguage();
23
28
  const { width } = useWindowDimensions();
24
29
 
30
+ const orderTypeText = {
31
+ key: getTypesText(options?.type || 1),
32
+ value: t(getTypesText(options?.type || 1), 'Delivery')
33
+ }
34
+
25
35
  const styles = StyleSheet.create({
26
36
  productStyle: {
27
37
  width,
@@ -39,7 +49,7 @@ const AddressDetailsUI = (props: any) => {
39
49
  lineHeight={24}
40
50
  color={theme.colors.textNormal}
41
51
  >
42
- {t('DELIVERY_ADDRESS', 'Delivery address')}
52
+ {t(`${orderTypeText.key}_ADDRESS`, `${orderTypeText.value} address`)}
43
53
  </OText>
44
54
  )}
45
55
  </ADHeader>
@@ -310,7 +310,7 @@ const MultiCheckoutUI = (props: any) => {
310
310
  </TopHeader>
311
311
  </View>
312
312
  </SafeAreaView>
313
- <Container pt={0} noPadding onScroll={handleScroll}>
313
+ <Container pt={0} noPadding onScroll={handleScroll} showsVerticalScrollIndicator={false}>
314
314
  <View style={styles.wrapperNavbar}>
315
315
  <NavBar
316
316
  hideArrowLeft