ordering-ui-react-native 0.16.70-release → 0.16.71-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.16.70-release",
3
+ "version": "0.16.71-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import { Pressable, StyleSheet, View, ScrollView, TouchableOpacity, Platform } from 'react-native';
2
+ import { Pressable, StyleSheet, View, ScrollView, TouchableOpacity } from 'react-native';
3
3
  import { useTheme } from 'styled-components/native'
4
4
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
5
5
  import FastImage from 'react-native-fast-image'
@@ -27,7 +27,6 @@ import {
27
27
  import { OButton, OIcon, OText, OModal } from '../shared';
28
28
  import { NotFoundSource } from '../NotFoundSource';
29
29
  import { WalletTransactions } from '../WalletTransactions'
30
- import { GiftCardUI } from '../GiftCard/GiftCardUI'
31
30
 
32
31
  const WalletsUI = (props: any) => {
33
32
  const {
@@ -48,7 +47,6 @@ const WalletsUI = (props: any) => {
48
47
  const [{ parsePrice }] = useUtils()
49
48
  const [{ configs }] = useConfig()
50
49
 
51
-
52
50
  const styles = StyleSheet.create({
53
51
  logoStyle: {
54
52
  width: 120,
@@ -59,20 +57,12 @@ const WalletsUI = (props: any) => {
59
57
  flexDirection: 'column',
60
58
  justifyContent: 'center',
61
59
  alignItems: 'center',
62
- },
63
- dividerStyle: {
64
- height: 8,
65
- backgroundColor: theme.colors.backgroundGray100,
66
- marginVertical: 25,
67
- marginHorizontal: -40,
68
- width: '100%'
69
60
  }
70
61
  });
71
62
 
72
63
  const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
73
64
  const [openHistory, setOpenHistory] = useState(false)
74
65
  const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
75
- const hideWalletsTheme = theme?.bar_menu?.components?.wallets?.hidden
76
66
 
77
67
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
78
68
 
@@ -121,47 +111,7 @@ const WalletsUI = (props: any) => {
121
111
  <>
122
112
  <Container>
123
113
  <Header>
124
- <View style={{
125
- ...{
126
- width: '100%',
127
- display: 'flex',
128
- flexDirection: 'row',
129
- alignItems: 'center',
130
- },
131
- }}>
132
- {(!props.hideBackBtn || !hideWalletsTheme) && !isChewLayout && (
133
- <OButton
134
- imgLeftStyle={{ width: 18 }}
135
- imgRightSrc={null}
136
- style={{
137
- borderWidth: 0,
138
- width: 26,
139
- height: 26,
140
- backgroundColor: '#FFF',
141
- borderColor: '#FFF',
142
- shadowColor: '#FFF',
143
- paddingLeft: 0,
144
- paddingRight: 0,
145
- marginTop: 30,
146
- }}
147
- onClick={goToBack}
148
- icon={AntDesignIcon}
149
- iconProps={{
150
- name: 'arrowleft',
151
- size: 26
152
- }}
153
- />
154
- )}
155
- <OText
156
- size={20}
157
- style={{
158
- marginTop: 30,
159
- marginLeft: (!props.hideBackBtn || !hideWalletsTheme) && !isChewLayout ? 10 : 0,
160
- color: theme.colors.textNormal,
161
- }}
162
- weight={Platform.OS === 'ios' ? '600' : 'bold'}
163
- >{t('WALLETS', 'Wallets')}</OText>
164
- </View>
114
+ <OText size={24} style={{ marginTop: 30 }}>{t('WALLETS', 'Wallets')}</OText>
165
115
  {isChewLayout && (
166
116
  <OButton
167
117
  text={t('WALLET_HISTORY', 'Wallet history')}
@@ -196,8 +146,8 @@ const WalletsUI = (props: any) => {
196
146
  borderBottomWidth: 1,
197
147
  borderBottomColor:
198
148
  tabSelected === wallet.type
199
- ? theme.colors.textNormal
200
- : theme.colors.border
149
+ ? theme.colors.textNormal
150
+ : theme.colors.border
201
151
  }}
202
152
  >
203
153
  <OText>
@@ -256,10 +206,6 @@ const WalletsUI = (props: any) => {
256
206
  </OText>
257
207
  </BalanceElement>
258
208
 
259
- <View style={styles.dividerStyle} />
260
- <GiftCardUI navigation={navigation} />
261
- <View style={styles.dividerStyle} />
262
-
263
209
  {!isChewLayout && (
264
210
  <WalletTransactions
265
211
  transactionsList={transactionsList}