be-components 5.3.4 → 5.3.7

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.
Files changed (129) hide show
  1. package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js +196 -175
  2. package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  3. package/lib/commonjs/ProfileManager/Components/BasicStatus.js +45 -21
  4. package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
  5. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js +208 -198
  6. package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
  7. package/lib/commonjs/ProfileManager/Components/DOBManager.js +86 -70
  8. package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
  9. package/lib/commonjs/ProfileManager/Components/EmailManager.js +99 -83
  10. package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
  11. package/lib/commonjs/ProfileManager/Components/PasswordManager.js +135 -108
  12. package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
  13. package/lib/commonjs/ProfileManager/Components/PhoneManager.js +88 -72
  14. package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
  15. package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js +65 -52
  16. package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  17. package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js +70 -43
  18. package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  19. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +250 -141
  20. package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
  21. package/lib/commonjs/ProfileManager/Components/SettingsManager.js +5 -14
  22. package/lib/commonjs/ProfileManager/Components/SettingsManager.js.map +1 -1
  23. package/lib/commonjs/ProfileManager/Components/VouchCard.js +81 -94
  24. package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
  25. package/lib/commonjs/ProfileManager/api/index.js +0 -3
  26. package/lib/commonjs/ProfileManager/api/index.js.map +1 -1
  27. package/lib/commonjs/ProfileManager/index.js +36 -50
  28. package/lib/commonjs/ProfileManager/index.js.map +1 -1
  29. package/lib/module/ProfileManager/Components/BasicInfoManager.js +197 -176
  30. package/lib/module/ProfileManager/Components/BasicInfoManager.js.map +1 -1
  31. package/lib/module/ProfileManager/Components/BasicStatus.js +46 -22
  32. package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
  33. package/lib/module/ProfileManager/Components/CodeRedeem.js +209 -199
  34. package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
  35. package/lib/module/ProfileManager/Components/DOBManager.js +87 -71
  36. package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
  37. package/lib/module/ProfileManager/Components/EmailManager.js +100 -84
  38. package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
  39. package/lib/module/ProfileManager/Components/PasswordManager.js +135 -108
  40. package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
  41. package/lib/module/ProfileManager/Components/PhoneManager.js +89 -73
  42. package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
  43. package/lib/module/ProfileManager/Components/ProfilePicManager.js +66 -53
  44. package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
  45. package/lib/module/ProfileManager/Components/ProfileWelcome.js +71 -44
  46. package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
  47. package/lib/module/ProfileManager/Components/ProfileWizard.js +253 -142
  48. package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
  49. package/lib/module/ProfileManager/Components/SettingsManager.js +6 -15
  50. package/lib/module/ProfileManager/Components/SettingsManager.js.map +1 -1
  51. package/lib/module/ProfileManager/Components/VouchCard.js +82 -95
  52. package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
  53. package/lib/module/ProfileManager/api/index.js +0 -3
  54. package/lib/module/ProfileManager/api/index.js.map +1 -1
  55. package/lib/module/ProfileManager/index.js +37 -51
  56. package/lib/module/ProfileManager/index.js.map +1 -1
  57. package/lib/typescript/lib/commonjs/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
  58. package/lib/typescript/lib/commonjs/ProfileManager/Components/BasicStatus.d.ts +2 -1
  59. package/lib/typescript/lib/commonjs/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
  60. package/lib/typescript/lib/commonjs/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
  61. package/lib/typescript/lib/commonjs/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  62. package/lib/typescript/lib/commonjs/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  63. package/lib/typescript/lib/commonjs/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
  64. package/lib/typescript/lib/commonjs/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  65. package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfilePicManager.d.ts +2 -1
  66. package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
  67. package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWelcome.d.ts +2 -1
  68. package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
  69. package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWizard.d.ts +1 -2
  70. package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  71. package/lib/typescript/lib/commonjs/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
  72. package/lib/typescript/lib/commonjs/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  73. package/lib/typescript/lib/commonjs/ProfileManager/api/index.d.ts.map +1 -1
  74. package/lib/typescript/lib/commonjs/ProfileManager/index.d.ts +2 -1
  75. package/lib/typescript/lib/commonjs/ProfileManager/index.d.ts.map +1 -1
  76. package/lib/typescript/lib/module/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
  77. package/lib/typescript/lib/module/ProfileManager/Components/BasicStatus.d.ts +2 -1
  78. package/lib/typescript/lib/module/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
  79. package/lib/typescript/lib/module/ProfileManager/Components/CodeRedeem.d.ts +1 -3
  80. package/lib/typescript/lib/module/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
  81. package/lib/typescript/lib/module/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  82. package/lib/typescript/lib/module/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  83. package/lib/typescript/lib/module/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
  84. package/lib/typescript/lib/module/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  85. package/lib/typescript/lib/module/ProfileManager/Components/ProfilePicManager.d.ts +2 -1
  86. package/lib/typescript/lib/module/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
  87. package/lib/typescript/lib/module/ProfileManager/Components/ProfileWelcome.d.ts +2 -1
  88. package/lib/typescript/lib/module/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
  89. package/lib/typescript/lib/module/ProfileManager/Components/ProfileWizard.d.ts +1 -2
  90. package/lib/typescript/lib/module/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  91. package/lib/typescript/lib/module/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
  92. package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  93. package/lib/typescript/lib/module/ProfileManager/api/index.d.ts.map +1 -1
  94. package/lib/typescript/lib/module/ProfileManager/index.d.ts +2 -1
  95. package/lib/typescript/lib/module/ProfileManager/index.d.ts.map +1 -1
  96. package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
  97. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +2 -1
  98. package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
  99. package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
  100. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  101. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  102. package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
  103. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  104. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts +2 -1
  105. package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
  106. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +2 -1
  107. package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
  108. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +1 -1
  109. package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
  110. package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
  111. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  112. package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
  113. package/lib/typescript/src/ProfileManager/index.d.ts +2 -1
  114. package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
  115. package/package.json +1 -1
  116. package/src/ProfileManager/Components/BasicInfoManager.tsx +68 -48
  117. package/src/ProfileManager/Components/BasicStatus.tsx +68 -51
  118. package/src/ProfileManager/Components/CodeRedeem.tsx +117 -100
  119. package/src/ProfileManager/Components/DOBManager.tsx +96 -80
  120. package/src/ProfileManager/Components/EmailManager.tsx +65 -47
  121. package/src/ProfileManager/Components/PasswordManager.tsx +93 -74
  122. package/src/ProfileManager/Components/PhoneManager.tsx +25 -9
  123. package/src/ProfileManager/Components/ProfilePicManager.tsx +56 -36
  124. package/src/ProfileManager/Components/ProfileWelcome.tsx +44 -22
  125. package/src/ProfileManager/Components/ProfileWizard.tsx +281 -151
  126. package/src/ProfileManager/Components/SettingsManager.tsx +17 -21
  127. package/src/ProfileManager/Components/VouchCard.tsx +63 -50
  128. package/src/ProfileManager/api/index.ts +0 -3
  129. package/src/ProfileManager/index.tsx +33 -49
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { TouchableOpacity, Image, Modal, Alert, FlatList, Platform, useWindowDimensions } from 'react-native';
2
+ import { Image, Modal, Alert, FlatList, Platform } from 'react-native';
3
3
  import { Icons } from '../../Components';
4
4
  import Colors from '../../constants/colors';
5
5
  import { ProfileApi, ProfileHelpers } from '../api';
@@ -36,7 +36,6 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
36
36
  const [ disclaimer_confirmed, setDisclaimerConfirmed ] = useState(false);
37
37
  const [ id_disclaimer_confirmed, setIDDisclaimerConfirmed ] = useState(false);
38
38
  const [ info_visible, setInfoVisible ] = useState(false);
39
- const { height } = useWindowDimensions();
40
39
  const { code_request, promo } = code_details;
41
40
  useEffect(() => {
42
41
  getPlayerFromServer()
@@ -107,11 +106,10 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
107
106
  const renderSections = (data:{item:string, index:number}) => {
108
107
  switch(data.item){
109
108
  case 'header':
110
- if(height < 830){ return <></> }
111
109
  return (
112
110
  <View style={{ padding:20 }}>
113
- <Text size={30} theme='h1'>Help us identify you</Text>
114
- <Text style={{ marginTop:15 }} size={16} theme='h2'>We need to take extra steps to verify your account. Scan your Driver's License or state issued ID and take a selfie for instant verification</Text>
111
+ <Text size={26} theme='h1'>Help us identify you</Text>
112
+ <Text style={{ marginTop:15 }} size={14} theme='h2'>We need to take extra steps to verify your account. Scan your Driver's License or state issued ID and take a selfie for instant verification</Text>
115
113
  </View>
116
114
  )
117
115
  case 'info':
@@ -140,8 +138,10 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
140
138
  if(player.vouched_status != 'unverified'){ return <></> }
141
139
  return (
142
140
  <View style={{ padding:10 }}>
143
- <TouchableOpacity
144
- onPress={() => setDisclaimerConfirmed(!disclaimer_confirmed)}>
141
+ <Button
142
+ style={{ padding:0 }}
143
+ onPress={() => setDisclaimerConfirmed(!disclaimer_confirmed)}
144
+ >
145
145
  <View float style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
146
146
  <View transparent style={{ justifyContent:'center', alignItems:'center', borderWidth:1, borderColor:C.text.h1, borderRadius:4, height:20, width:20 }}>
147
147
  {disclaimer_confirmed ?
@@ -150,9 +150,11 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
150
150
  </View>
151
151
  <Text style={{ marginLeft:10, flex:1 }} theme='h2'>I confirm that my name is <Text size={14} theme='warning'>{player.first_name} {player.last_name}</Text> and that my date of birth is <Text size={14} theme='warning'>{new_date}</Text>. Mismatch will cause failure.</Text>
152
152
  </View>
153
- </TouchableOpacity>
154
- <TouchableOpacity
155
- onPress={() => setIDDisclaimerConfirmed(!id_disclaimer_confirmed)}
153
+ </Button>
154
+ <Button
155
+ onPress={() => setIDDisclaimerConfirmed(!id_disclaimer_confirmed)}
156
+ style={{ padding:0 }}
157
+
156
158
  >
157
159
  <View float style={{ marginTop:10, padding:10, flexDirection:'row', alignItems:'center' }}>
158
160
  <View transparent style={{ justifyContent:'center', alignItems:'center', borderWidth:1, borderColor:C.text.h1, borderRadius:4, height:20, width:20 }}>
@@ -162,7 +164,7 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
162
164
  </View>
163
165
  <Text style={{ marginLeft:10, flex:1 }} theme='h2'>I confirm that I am using a valid <Text size={14} theme='warning'>(Not Expired)</Text> US government issued ID. Expired ID will cause failure.</Text>
164
166
  </View>
165
- </TouchableOpacity>
167
+ </Button>
166
168
  </View>
167
169
  )
168
170
  case 'failed':
@@ -176,29 +178,39 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
176
178
  if(!code_request || !promo){ return <></> }
177
179
  if(['closed','fulfilled'].includes(code_request.status)){ return <></> }
178
180
  return (
179
- <View float style={{ margin:10, flexDirection:'row', backgroundColor:Colors.incentive.gold }}>
180
- <View transparent style={{ padding:10, justifyContent:'center', alignItems:'center' }}>
181
- <Icons.GiftIcon size={40} color={C.text.white} />
182
- {player.vouched_status == 'verified' ?
183
- <Text style={{ marginTop:5 }} textAlign='center' size={12} color={C.text.gold}>CLAIM NOW</Text>
184
- :<></>}
185
- </View>
186
- <View transparent style={{flex:1, padding:10 }}>
187
- <Text theme='h1'>{player.vouched_status == 'verified'?`Congrats! Press Here to claim your gift!`: 'Almost there! Last step to get your gift!'}</Text>
188
- <Text style={{ paddingTop:5 }} theme='h2'>{ProfileHelpers.getReferralDescription(promo)}</Text>
189
- </View>
181
+ <View>
190
182
  {player.vouched_status == 'verified' ?
191
- <TouchableOpacity
183
+ <Button
184
+ float
192
185
  disabled={player.vouched_status!='verified' ? true : false}
193
186
  onPress={() => onClaimGift()}
194
- style={{ position:'absolute', top: -60, right:0, left:0, justifyContent:'center', alignItems:'center' }}>
195
- <View float style={{ borderRadius:22, padding:10, marginBottom:7 }}>
187
+ style={{flexDirection:'row', alignItems:'center', justifyContent:'center', alignSelf:'center' }}
188
+ >
196
189
  <Text size={14} color={Colors.incentive.gold} weight='bold'>CLAIM ME NOW!</Text>
197
- </View>
198
- <Icons.ChevronIcon direction='down' size={8} color={Colors.incentive.gold} />
199
- </TouchableOpacity>
190
+ <Icons.ChevronIcon direction='down' size={8} color={Colors.incentive.gold} />
191
+ </Button>
200
192
  :<></>}
193
+ <Button
194
+ float
195
+ style={{ padding:0, margin:10, flexDirection:'row', backgroundColor:Colors.incentive.gold }}
196
+ disabled={player.vouched_status != 'verified' ? true : false}
197
+ onPress={() => onClaimGift()}
198
+ >
199
+
200
+ <View transparent style={{ padding:10, justifyContent:'center', alignItems:'center' }}>
201
+ <Icons.GiftIcon size={40} color={C.text.white} />
202
+ {player.vouched_status == 'verified' ?
203
+ <Text style={{ marginTop:5 }} textAlign='center' size={12} color={C.text.gold}>CLAIM NOW</Text>
204
+ :<></>}
205
+ </View>
206
+ <View transparent style={{flex:1, padding:10 }}>
207
+ <Text theme='h1'>{player.vouched_status == 'verified'?`Congrats! Press Here to claim your gift!`: 'Almost there! Last step to get your gift!'}</Text>
208
+ <Text style={{ paddingTop:5 }} theme='h2'>{ProfileHelpers.getReferralDescription(promo)}</Text>
209
+ </View>
210
+
211
+ </Button>
201
212
  </View>
213
+
202
214
  )
203
215
  default: return <></>
204
216
  }
@@ -214,6 +226,26 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
214
226
  renderItem={renderSections}
215
227
  />
216
228
  </View>
229
+ {verify_errors.length > 0 ?
230
+ <View style={{ padding:10 }}>
231
+ <View type='footer' style={{ padding:20, borderRadius:8 }}>
232
+ <View transparent style={{ padding:10 }}>
233
+ <Text size={18} theme='h1'>ERRORS:</Text>
234
+ <Text style={{ marginTop:5 }} theme='description'>Please fix the following before continuing to verify</Text>
235
+ </View>
236
+ <View float style={{ padding:10, borderRadius:8 }}>
237
+ {verify_errors.map((e,i) => {
238
+ return (
239
+ <View transparent style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
240
+ <Text size={12} color={Colors.utility.warning} weight='bold'>{i+1} - {e}</Text>
241
+
242
+ </View>
243
+ )
244
+ })}
245
+ </View>
246
+ </View>
247
+ </View>
248
+ :<></>}
217
249
  <View nativeID='action_row' style={{ flexDirection:'row', padding:10 }}>
218
250
  {walkthrough ?
219
251
  <Button
@@ -234,8 +266,8 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
234
266
  <Button
235
267
  title={'START'}
236
268
  loading={vouching || vouch_loading}
237
- disabled={!scan_ready || vouch_loading}
238
- style={{ flex:3, opacity:scan_ready && scan_ready&&!vouching?1:0.5 }}
269
+ disabled={!scan_ready || vouch_loading || verify_errors.length > 0}
270
+ style={{ flex:3, opacity:scan_ready && scan_ready&&!vouching&&verify_errors.length == 0?1:0.5 }}
239
271
  type='success'
240
272
  onPress={() => startVouchingPlayer()}
241
273
  />
@@ -250,26 +282,7 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
250
282
  </View>
251
283
  }
252
284
  </View>
253
- {verify_errors.length > 0 ?
254
- <View type='blur' style={{ position:'absolute', top:0, left:0, right:0, bottom:0, justifyContent:'center', alignItems:'center', padding:20 }}>
255
- <View float style={{ padding:20, borderRadius:8 }}>
256
- <View transparent style={{ padding:10 }}>
257
- <Text size={18} theme='h1'>ERRORS:</Text>
258
- <Text style={{ marginTop:5 }} theme='description'>Please fix the following before continuing to verify</Text>
259
- </View>
260
- <View float style={{ padding:10, borderRadius:8 }}>
261
- {verify_errors.map((e,i) => {
262
- return (
263
- <View transparent style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
264
- <Text size={12} color={Colors.utility.warning} weight='bold'>{i+1} - {e}</Text>
265
-
266
- </View>
267
- )
268
- })}
269
- </View>
270
- </View>
271
- </View>
272
- :<></>}
285
+
273
286
  <Modal
274
287
  visible={player?.vouched_status == 'unverified' && vouching ? true : false}
275
288
  transparent
@@ -79,12 +79,10 @@ const ProfileApi = {
79
79
  },
80
80
  getMySettings: async():Promise<{ settings:SettingProps[], player_settings:PlayerSettingProps[] }> => {
81
81
  const resp = await axios.get(`${AUTH_SVC_API}/v1/settings/me`)
82
- console.log(resp.data)
83
82
  return resp.data
84
83
  },
85
84
  updatePlayerSetting: async(player_setting:PlayerSettingProps):Promise<PlayerSettingProps> => {
86
85
  const resp = await axios.post(`${AUTH_SVC_API}/v1/settings/player/update`, { player_setting })
87
- console.log(resp.data)
88
86
  return resp.data.player_setting
89
87
  },
90
88
  redeemCode: async(code_request_id:string):Promise<{ code_request?:CodeRequestProps, promo?:PromoProps, player_referral?:PlayerReferralProps, referrer?:PublicPlayerProps, reward_option?:RewardOptionProps }> => {
@@ -93,7 +91,6 @@ const ProfileApi = {
93
91
  },
94
92
  tryCodeRequest: async(referral_code:string):Promise<{ result:'success'|'failed', error_message?:string, code_request?:CodeRequestProps, promo?:PromoProps, player_referral?:PlayerReferralProps, referrer?:PublicPlayerProps, reward_option?:RewardOptionProps }> => {
95
93
  const resp = await axios.post(`${AUTH_SVC_API}/v1/promos/request/try`, { referral_code })
96
- console.log(resp.data)
97
94
  return resp.data
98
95
  },
99
96
  setPassword: async(password:string, re_password:string, current_password?:string):Promise<MyPlayerProps> => {
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
- import { Image, ActivityIndicator, FlatList } from 'react-native';
2
+ import { Image, ActivityIndicator } from 'react-native';
3
3
  import Colors from '../constants/colors';
4
4
  import ProfileWizard from './Components/ProfileWizard';
5
5
  import { ProfileApi } from './api';
@@ -12,6 +12,7 @@ type ProfileOverviewProps = {
12
12
  hide_powered_by?:boolean,
13
13
  hide_profile_header?:boolean,
14
14
  player?:MyPlayerProps,
15
+ keyboard_height:number,
15
16
  hidden_groups?:string[],
16
17
  insets?:{ top:number, bottom:number, left:number, right:number }
17
18
  hidden_steps?:string[],
@@ -36,7 +37,7 @@ type ProfileOverviewProps = {
36
37
  }
37
38
  }
38
39
 
39
- const ProfileManager = ({ profile_attribute, view_mode, hide_profile_header, insets, player, hide_powered_by, onRedeemCode, onPlayerUpdate, onNextStep, onFocusPosition, onVouchStart, show_welcome, hidden_groups, hidden_steps, hidden_levels, walkthrough, onClose, onLogout }: ProfileOverviewProps ) => {
40
+ const ProfileManager = ({ profile_attribute, keyboard_height, view_mode, hide_profile_header, insets, player, hide_powered_by, onRedeemCode, onPlayerUpdate, onNextStep, onFocusPosition, onVouchStart, show_welcome, hidden_groups, hidden_steps, hidden_levels, walkthrough, onClose, onLogout }: ProfileOverviewProps ) => {
40
41
  const [ width, setModuleWidth ] = useState(400);
41
42
  const [ loading, setLoading ] = useState(false);
42
43
  const [ vouching, setVouching ] = useState(false);
@@ -79,46 +80,6 @@ const ProfileManager = ({ profile_attribute, view_mode, hide_profile_header, ins
79
80
  onClose()
80
81
  }
81
82
 
82
- const renderProfile = (data:{ item:string, index:number }) => {
83
- switch(data.item){
84
- case 'profile':
85
- if(!draft_player){ return <></> }
86
- return (
87
- <ProfileWizard
88
- player={draft_player}
89
- player_settings={player_settings}
90
- onVouching={(active) => {
91
- if(active && onVouchStart){ onVouchStart() }
92
- setVouching(active)
93
- }}
94
- width={width}
95
- onRedeemCode={onRedeemCode}
96
- settings={settings}
97
- insets={insets}
98
- view_mode={view_mode}
99
- show_welcome={show_welcome}
100
- onFocusPosition={onFocusPosition}
101
- hide_powered_by={hide_powered_by}
102
- hidden_groups={hidden_groups}
103
- hidden_steps={hidden_steps}
104
- hidden_levels={hidden_levels}
105
- init_walkthrough={walkthrough}
106
- onNextStep={(step:string) => onNextStep ? onNextStep(step) : console.log()}
107
- onClose={() => onClose()}
108
- onLogout={() => handleLogout()}
109
- profile_attribute={profile_attribute}
110
- onSelectLevel={(level) => console.log(level)}
111
- onUpdatePlayerSetting={(new_ps) => setPlayerSettings(player_settings.filter(ps => ps.player_setting_id != new_ps.player_setting_id).concat(new_ps))}
112
- onPlayerUpdate={(player, attribute) => {
113
- setDraftPlayer(player)
114
- if(onPlayerUpdate){ onPlayerUpdate(player, attribute) }
115
- }}
116
- />
117
- )
118
- default: return <></>
119
- }
120
- }
121
-
122
83
  if(!draft_player || loading){
123
84
  return (
124
85
  <View style={{ flex:1 }}>
@@ -154,15 +115,38 @@ const ProfileManager = ({ profile_attribute, view_mode, hide_profile_header, ins
154
115
  :<></>}
155
116
  </View>
156
117
  :<></>}
157
- <View style={{ flex:1 }}>
158
- <FlatList
159
- data={['profile']}
160
- key={'profile_list'}
161
- keyExtractor={item => item}
162
- renderItem={renderProfile}
118
+ <View style={{ flex:1, paddingBottom:keyboard_height }}>
119
+ <ProfileWizard
120
+ player={draft_player}
121
+ player_settings={player_settings}
122
+ onVouching={(active) => {
123
+ if(active && onVouchStart){ onVouchStart() }
124
+ setVouching(active)
125
+ }}
126
+ width={width}
127
+ onRedeemCode={onRedeemCode}
128
+ settings={settings}
129
+ insets={insets}
130
+ view_mode={view_mode}
131
+ show_welcome={show_welcome}
132
+ onFocusPosition={onFocusPosition}
133
+ hide_powered_by={hide_powered_by}
134
+ hidden_groups={hidden_groups}
135
+ hidden_steps={hidden_steps}
136
+ hidden_levels={hidden_levels}
137
+ init_walkthrough={walkthrough}
138
+ onNextStep={(step:string) => onNextStep ? onNextStep(step) : console.log()}
139
+ onClose={() => onClose()}
140
+ onLogout={() => handleLogout()}
141
+ profile_attribute={profile_attribute}
142
+ onSelectLevel={(level) => console.log(level)}
143
+ onUpdatePlayerSetting={(new_ps) => setPlayerSettings(player_settings.filter(ps => ps.player_setting_id != new_ps.player_setting_id).concat(new_ps))}
144
+ onPlayerUpdate={(player, attribute) => {
145
+ setDraftPlayer(player)
146
+ if(onPlayerUpdate){ onPlayerUpdate(player, attribute) }
147
+ }}
163
148
  />
164
149
  </View>
165
-
166
150
  </View>
167
151
  </View>
168
152
  )