ordering-ui-react-native 0.15.33 → 0.15.34
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
|
@@ -32,17 +32,17 @@ const Intro = (props: any): React.ReactElement => {
|
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
return (
|
|
35
|
-
<ScrollView
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
>
|
|
35
|
+
// <ScrollView
|
|
36
|
+
// scrollEnabled={false}
|
|
37
|
+
// refreshControl={
|
|
38
|
+
// <RefreshControl
|
|
39
|
+
// refreshing={showLogoutPopup ? false : refreshing}
|
|
40
|
+
// onRefresh={() => setShowLogoutPopup(true)}
|
|
41
|
+
// />
|
|
42
|
+
// }
|
|
43
|
+
// >
|
|
44
44
|
<Pressable onPress={goBusiness}>
|
|
45
|
-
<
|
|
45
|
+
<View style={{ height: orientationState?.dimensions?.height }}>
|
|
46
46
|
{orientationState.orientation === PORTRAIT ? (
|
|
47
47
|
<View
|
|
48
48
|
style={{
|
|
@@ -132,9 +132,9 @@ const Intro = (props: any): React.ReactElement => {
|
|
|
132
132
|
open={showLogoutPopup}
|
|
133
133
|
onClose={() => setShowLogoutPopup(false)}
|
|
134
134
|
/>
|
|
135
|
-
</
|
|
135
|
+
</View>
|
|
136
136
|
</Pressable>
|
|
137
|
-
</ScrollView>
|
|
137
|
+
// </ScrollView>
|
|
138
138
|
);
|
|
139
139
|
};
|
|
140
140
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React,{ useState, useEffect } from 'react'
|
|
2
2
|
import Spinner from 'react-native-loading-spinner-overlay';
|
|
3
|
-
import { StyleSheet, View, Platform } from 'react-native'
|
|
3
|
+
import { StyleSheet, View, Platform, ImageBackground } from 'react-native'
|
|
4
4
|
import {
|
|
5
5
|
UpsellingPage as UpsellingPageController,
|
|
6
6
|
useUtils,
|
|
@@ -20,6 +20,7 @@ import { Container } from '../../layouts/Container';
|
|
|
20
20
|
import GridContainer from '../../layouts/GridContainer';
|
|
21
21
|
import { PORTRAIT, useDeviceOrientation } from "../../../../../src/hooks/DeviceOrientation";
|
|
22
22
|
import { useTheme } from 'styled-components/native';
|
|
23
|
+
import FastImage from 'react-native-fast-image';
|
|
23
24
|
|
|
24
25
|
const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
25
26
|
const {
|
|
@@ -114,7 +115,24 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
114
115
|
{
|
|
115
116
|
!upsellingProducts.error ? upsellingProducts.products.map((product: any) => (
|
|
116
117
|
<Item key={product.id}>
|
|
117
|
-
|
|
118
|
+
{product?.images ? (
|
|
119
|
+
<FastImage
|
|
120
|
+
style={styles.imageStyle}
|
|
121
|
+
source={{
|
|
122
|
+
uri: product?.images,
|
|
123
|
+
priority: FastImage.priority.normal,
|
|
124
|
+
// cache:FastImage.cacheControl.web
|
|
125
|
+
}}
|
|
126
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
127
|
+
/>
|
|
128
|
+
) : (
|
|
129
|
+
<ImageBackground
|
|
130
|
+
style={styles.imageStyle}
|
|
131
|
+
source={theme.images.dummies.product}
|
|
132
|
+
imageStyle={{ borderRadius: 10 }}
|
|
133
|
+
resizeMode='cover'
|
|
134
|
+
/>
|
|
135
|
+
)}
|
|
118
136
|
<Details>
|
|
119
137
|
<OText
|
|
120
138
|
weight="500"
|
|
@@ -125,24 +143,22 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
125
143
|
{product.name}
|
|
126
144
|
</OText>
|
|
127
145
|
|
|
128
|
-
|
|
129
|
-
<OText
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
</OText>
|
|
146
|
+
<OText>
|
|
147
|
+
<OText
|
|
148
|
+
color={theme.colors.primary}
|
|
149
|
+
weight="500"
|
|
150
|
+
>
|
|
151
|
+
{parsePrice(product.price)}
|
|
152
|
+
</OText>
|
|
136
153
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
</OText>
|
|
154
|
+
<OText
|
|
155
|
+
color={theme.colors.mediumGray}
|
|
156
|
+
size={12}
|
|
157
|
+
style={{textDecorationLine: 'line-through', textDecorationStyle: 'solid'}}
|
|
158
|
+
>
|
|
159
|
+
{product?.offer_price ? ` ${parsePrice(product?.offer_price)} ` : ''}
|
|
144
160
|
</OText>
|
|
145
|
-
|
|
161
|
+
</OText>
|
|
146
162
|
</Details>
|
|
147
163
|
|
|
148
164
|
<OButton
|
|
@@ -200,24 +216,22 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
200
216
|
{product.name}
|
|
201
217
|
</OText>
|
|
202
218
|
|
|
203
|
-
|
|
204
|
-
<OText
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
</OText>
|
|
219
|
+
<OText>
|
|
220
|
+
<OText
|
|
221
|
+
color={theme.colors.primary}
|
|
222
|
+
weight="500"
|
|
223
|
+
>
|
|
224
|
+
{parsePrice(product.price)}
|
|
225
|
+
</OText>
|
|
211
226
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
</OText>
|
|
227
|
+
<OText
|
|
228
|
+
color={theme.colors.mediumGray}
|
|
229
|
+
size={12}
|
|
230
|
+
style={{textDecorationLine: 'line-through', textDecorationStyle: 'solid'}}
|
|
231
|
+
>
|
|
232
|
+
{product?.offer_price ? parsePrice(product?.offer_price) : ''}
|
|
219
233
|
</OText>
|
|
220
|
-
|
|
234
|
+
</OText>
|
|
221
235
|
</Details>
|
|
222
236
|
<OButton
|
|
223
237
|
text={t('ADD_PRODUCT', 'add product')}
|