be-components 5.3.3 → 5.3.6
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/lib/commonjs/ProfileManager/Components/BasicInfoManager.js +180 -164
- package/lib/commonjs/ProfileManager/Components/BasicInfoManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/BasicStatus.js +45 -21
- package/lib/commonjs/ProfileManager/Components/BasicStatus.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/CodeRedeem.js +208 -198
- package/lib/commonjs/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/DOBManager.js +75 -61
- package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/EmailManager.js +86 -72
- package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/PasswordManager.js +119 -98
- package/lib/commonjs/ProfileManager/Components/PasswordManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/PhoneManager.js +74 -60
- package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js +49 -41
- package/lib/commonjs/ProfileManager/Components/ProfilePicManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js +70 -43
- package/lib/commonjs/ProfileManager/Components/ProfileWelcome.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/ProfileWizard.js +250 -141
- package/lib/commonjs/ProfileManager/Components/ProfileWizard.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/SettingsManager.js +5 -14
- package/lib/commonjs/ProfileManager/Components/SettingsManager.js.map +1 -1
- package/lib/commonjs/ProfileManager/Components/VouchCard.js +81 -94
- package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/commonjs/ProfileManager/api/index.js +0 -3
- package/lib/commonjs/ProfileManager/api/index.js.map +1 -1
- package/lib/commonjs/ProfileManager/index.js +3 -2
- package/lib/commonjs/ProfileManager/index.js.map +1 -1
- package/lib/module/ProfileManager/Components/BasicInfoManager.js +181 -165
- package/lib/module/ProfileManager/Components/BasicInfoManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/BasicStatus.js +46 -22
- package/lib/module/ProfileManager/Components/BasicStatus.js.map +1 -1
- package/lib/module/ProfileManager/Components/CodeRedeem.js +209 -199
- package/lib/module/ProfileManager/Components/CodeRedeem.js.map +1 -1
- package/lib/module/ProfileManager/Components/DOBManager.js +76 -62
- package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/EmailManager.js +87 -73
- package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/PasswordManager.js +119 -98
- package/lib/module/ProfileManager/Components/PasswordManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/PhoneManager.js +75 -61
- package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfilePicManager.js +50 -42
- package/lib/module/ProfileManager/Components/ProfilePicManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfileWelcome.js +71 -44
- package/lib/module/ProfileManager/Components/ProfileWelcome.js.map +1 -1
- package/lib/module/ProfileManager/Components/ProfileWizard.js +253 -142
- package/lib/module/ProfileManager/Components/ProfileWizard.js.map +1 -1
- package/lib/module/ProfileManager/Components/SettingsManager.js +6 -15
- package/lib/module/ProfileManager/Components/SettingsManager.js.map +1 -1
- package/lib/module/ProfileManager/Components/VouchCard.js +82 -95
- package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/module/ProfileManager/api/index.js +0 -3
- package/lib/module/ProfileManager/api/index.js.map +1 -1
- package/lib/module/ProfileManager/index.js +3 -2
- package/lib/module/ProfileManager/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/BasicStatus.d.ts +2 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/DOBManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/EmailManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfilePicManager.d.ts +2 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWelcome.d.ts +2 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWizard.d.ts +1 -2
- package/lib/typescript/lib/commonjs/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/ProfileManager/index.d.ts +2 -1
- package/lib/typescript/lib/commonjs/ProfileManager/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/BasicStatus.d.ts +2 -1
- package/lib/typescript/lib/module/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/CodeRedeem.d.ts +1 -3
- package/lib/typescript/lib/module/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/DOBManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/EmailManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/ProfilePicManager.d.ts +2 -1
- package/lib/typescript/lib/module/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/ProfileWelcome.d.ts +2 -1
- package/lib/typescript/lib/module/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/ProfileWizard.d.ts +1 -2
- package/lib/typescript/lib/module/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/ProfileManager/index.d.ts +2 -1
- package/lib/typescript/lib/module/ProfileManager/index.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/BasicInfoManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts +2 -1
- package/lib/typescript/src/ProfileManager/Components/BasicStatus.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/CodeRedeem.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/PasswordManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts +2 -1
- package/lib/typescript/src/ProfileManager/Components/ProfilePicManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts +2 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWelcome.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts +1 -1
- package/lib/typescript/src/ProfileManager/Components/ProfileWizard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/SettingsManager.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/ProfileManager/index.d.ts +2 -1
- package/lib/typescript/src/ProfileManager/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ProfileManager/Components/BasicInfoManager.tsx +66 -48
- package/src/ProfileManager/Components/BasicStatus.tsx +68 -51
- package/src/ProfileManager/Components/CodeRedeem.tsx +117 -100
- package/src/ProfileManager/Components/DOBManager.tsx +92 -79
- package/src/ProfileManager/Components/EmailManager.tsx +62 -47
- package/src/ProfileManager/Components/PasswordManager.tsx +87 -70
- package/src/ProfileManager/Components/PhoneManager.tsx +24 -11
- package/src/ProfileManager/Components/ProfilePicManager.tsx +54 -36
- package/src/ProfileManager/Components/ProfileWelcome.tsx +44 -22
- package/src/ProfileManager/Components/ProfileWizard.tsx +281 -151
- package/src/ProfileManager/Components/SettingsManager.tsx +17 -21
- package/src/ProfileManager/Components/VouchCard.tsx +63 -50
- package/src/ProfileManager/api/index.ts +0 -3
- package/src/ProfileManager/index.tsx +33 -35
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { ActivityIndicator, TouchableOpacity,
|
|
2
|
+
import { ActivityIndicator, TouchableOpacity, FlatList } from 'react-native';
|
|
3
3
|
import { Icons } from '../../Components';
|
|
4
4
|
import Colors from '../../constants/colors';
|
|
5
5
|
import { ProfileApi } from '../api';
|
|
@@ -17,6 +17,7 @@ type BasicInfoManagerProps = {
|
|
|
17
17
|
onPlayerUpdate:(player:MyPlayerProps) => void
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
const sections = ['username','name']
|
|
20
21
|
const BasicInfoManager = ({ player, walkthrough, onFocusPosition, onPlayerUpdate, onNext, onClose }:BasicInfoManagerProps) => {
|
|
21
22
|
const C = useColors();
|
|
22
23
|
const [ draft_player, setDraftPlayer ] = useState<MyPlayerProps>(player)
|
|
@@ -60,16 +61,11 @@ const BasicInfoManager = ({ player, walkthrough, onFocusPosition, onPlayerUpdate
|
|
|
60
61
|
|
|
61
62
|
const allow_next = username_valid.valid && !username_valid.loading && draft_player.first_name && draft_player.last_name ? true : false
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<Text size={30} theme='h1'>Let's start with the basics</Text>
|
|
69
|
-
<Text style={{ marginTop:15 }} size={16} theme='h2'>You can change this later, but will be required to verify your account.</Text>
|
|
70
|
-
</View>
|
|
71
|
-
:<></>}
|
|
72
|
-
<View style={{ padding:30 }}>
|
|
64
|
+
const renderSections = (data:{ item:string, index:number }) => {
|
|
65
|
+
switch(data.item){
|
|
66
|
+
case 'username':
|
|
67
|
+
return (
|
|
68
|
+
<View style={{ padding:30 }}>
|
|
73
69
|
<Text weight='bold' size={18} theme='h1'>USERNAME</Text>
|
|
74
70
|
<Text style={{ marginTop:5 }} theme='h2'>To start, we randomly generate a username for you! Change it if you'd like here.</Text>
|
|
75
71
|
<View type='input' style={{ marginTop:20, flexDirection:'row', alignItems:'center' }}>
|
|
@@ -113,47 +109,69 @@ const BasicInfoManager = ({ player, walkthrough, onFocusPosition, onPlayerUpdate
|
|
|
113
109
|
</View>
|
|
114
110
|
</View>
|
|
115
111
|
</View>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
112
|
+
)
|
|
113
|
+
case 'name':
|
|
114
|
+
return (
|
|
115
|
+
<View style={{ padding:30 }}>
|
|
116
|
+
<Text weight='bold' size={18} theme='h1'>NAME</Text>
|
|
117
|
+
<Text style={{ marginTop:5 }} theme='h2'>Add / Update your name below. This is required to verify your account</Text>
|
|
118
|
+
<View type='input' style={{ marginTop:20, flexDirection:'row', alignItems:'center' }}>
|
|
119
|
+
<View transparent style={{ paddingLeft:15, paddingRight:15 }}>
|
|
120
|
+
<Icons.UserIcon
|
|
121
|
+
color={C.text.h1}
|
|
122
|
+
size={18}
|
|
123
|
+
/>
|
|
124
|
+
</View>
|
|
125
|
+
<TextInput
|
|
126
|
+
value={draft_player.first_name}
|
|
127
|
+
placeholder='First Name'
|
|
128
|
+
onFocusPosition={onFocusPosition}
|
|
129
|
+
placeholderTextColor={Colors.brand.slate}
|
|
130
|
+
editable={player.vouched_status != 'verified' ? true : false}
|
|
131
|
+
style={{ flex:1, borderTopLeftRadius:0, borderBottomLeftRadius:0 }}
|
|
132
|
+
onChangeText={(text) => setDraftPlayer({ ...draft_player, first_name: text })}
|
|
125
133
|
/>
|
|
126
134
|
</View>
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
<View type='input' style={{ marginTop:10, flexDirection:'row', alignItems:'center' }}>
|
|
136
|
+
<View transparent style={{ paddingLeft:15, paddingRight:15 }}>
|
|
137
|
+
<Icons.UserIcon
|
|
138
|
+
color={C.text.h1}
|
|
139
|
+
size={18}
|
|
140
|
+
/>
|
|
141
|
+
</View>
|
|
142
|
+
<TextInput
|
|
143
|
+
value={draft_player.last_name}
|
|
144
|
+
placeholder='Last Name'
|
|
145
|
+
|
|
146
|
+
onFocusPosition={onFocusPosition}
|
|
147
|
+
placeholderTextColor={Colors.brand.slate}
|
|
148
|
+
editable={player.vouched_status != 'verified' ? true : false}
|
|
149
|
+
style={{ flex:1, borderTopLeftRadius:0, borderBottomLeftRadius:0 }}
|
|
150
|
+
onChangeText={(text) => setDraftPlayer({ ...draft_player, last_name: text })}
|
|
142
151
|
/>
|
|
143
152
|
</View>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
</
|
|
153
|
+
</View>
|
|
154
|
+
)
|
|
155
|
+
default: return <></>
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return (
|
|
160
|
+
<View style={{ flex:1 }}>
|
|
161
|
+
{walkthrough ?
|
|
162
|
+
<View style={{ padding:20 }}>
|
|
163
|
+
<Text size={26} theme='h1'>Let's start with the basics</Text>
|
|
164
|
+
<Text style={{ marginTop:15 }} size={14} theme='h2'>You can change this later, but will be required to verify your account.</Text>
|
|
165
|
+
</View>
|
|
166
|
+
:<></>}
|
|
167
|
+
<View style={{ flex:1 }}>
|
|
168
|
+
<FlatList
|
|
169
|
+
data={sections}
|
|
170
|
+
key={'basic_sections'}
|
|
171
|
+
keyExtractor={(item) => item}
|
|
172
|
+
renderItem={renderSections}
|
|
173
|
+
/>
|
|
174
|
+
</View>
|
|
157
175
|
{walkthrough ?
|
|
158
176
|
<View nativeID='action_row' style={{ flexDirection:'row', justifyContent:'space-between', padding:10 }}>
|
|
159
177
|
<Button
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FlatList, Image } from 'react-native';
|
|
3
3
|
import { Icons } from '../../Components';
|
|
4
4
|
import type { CodeRequestProps, MyPlayerProps, PlayerReferralProps, PromoProps, PublicPlayerProps } from '../../types';
|
|
5
5
|
import { Button, Text, View } from '../../Components/Themed';
|
|
@@ -7,6 +7,7 @@ import { useColors } from '../../constants/useColors';
|
|
|
7
7
|
|
|
8
8
|
type BasicStatusProps = {
|
|
9
9
|
player:MyPlayerProps,
|
|
10
|
+
width:number,
|
|
10
11
|
code_details: {
|
|
11
12
|
code_request?:CodeRequestProps,
|
|
12
13
|
referrer?:PublicPlayerProps,
|
|
@@ -16,11 +17,13 @@ type BasicStatusProps = {
|
|
|
16
17
|
onClose:() => void,
|
|
17
18
|
onVerify:() => void
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
const BasicStatus = ({ onVerify, code_details, player, onClose }:BasicStatusProps) => {
|
|
20
|
+
const sections = ['image'];
|
|
21
|
+
const BasicStatus = ({ onVerify, width, code_details, player, onClose }:BasicStatusProps) => {
|
|
21
22
|
const C = useColors();
|
|
22
23
|
const { code_request, promo } = code_details;
|
|
23
24
|
|
|
25
|
+
const MAX_WIDTH = 500
|
|
26
|
+
const size = width > MAX_WIDTH ? MAX_WIDTH : width
|
|
24
27
|
const getStatus = (p:MyPlayerProps) => {
|
|
25
28
|
let errors:string[] = []
|
|
26
29
|
if(!p.first_name || !p.last_name){ errors.push('A first and last name are required to use real money') }
|
|
@@ -28,62 +31,76 @@ const BasicStatus = ({ onVerify, code_details, player, onClose }:BasicStatusProp
|
|
|
28
31
|
return errors
|
|
29
32
|
}
|
|
30
33
|
|
|
31
|
-
const errors = getStatus(player)
|
|
34
|
+
const errors = getStatus(player);
|
|
35
|
+
|
|
36
|
+
const renderSections = (data: { item:string, index:number }) => {
|
|
37
|
+
switch(data.item){
|
|
38
|
+
case 'image':
|
|
39
|
+
return (
|
|
40
|
+
<View style={{ justifyContent:'center', alignItems:'center' }}>
|
|
41
|
+
<Image
|
|
42
|
+
source={{ uri:'https://res.cloudinary.com/hoabts6mc/image/upload/v1714410165/Welcome_banner_bqu6cc.webp' }}
|
|
43
|
+
style={{ width:size, height:size, borderRadius:4 }}
|
|
44
|
+
resizeMode='cover'
|
|
45
|
+
/>
|
|
46
|
+
</View>
|
|
47
|
+
)
|
|
48
|
+
default: return <></>
|
|
49
|
+
}
|
|
50
|
+
}
|
|
32
51
|
|
|
33
52
|
return (
|
|
34
53
|
<View style={{ flex:1 }}>
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<View style={{ padding:10,
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
-
<Text style={{ marginTop:5 }} theme='h2'>Your profile is ready to go for play money betting and all our FREE TO PLAY games.</Text>
|
|
50
|
-
</View>
|
|
51
|
-
</View>
|
|
52
|
-
{player.vouched_status != 'verified' ?
|
|
53
|
-
<View style={{ padding:10, flexDirection:'row' }}>
|
|
54
|
-
<Icons.AlertIcon color={C.text.warning} size={32}/>
|
|
55
|
-
<View style={{ flex:1, marginLeft:20 }}>
|
|
56
|
-
|
|
57
|
-
<Text theme='h1'>WANT TO USE REAL MONEY?</Text>
|
|
58
|
-
{errors.length == 0 ?
|
|
59
|
-
<Text style={{ marginTop:5 }} theme='description'>Continue on your journey and complete the verification steps in just a couple minutes.</Text>
|
|
60
|
-
:
|
|
61
|
-
<View style={{ marginTop:5 }}>
|
|
62
|
-
<Text size={14} theme='warning'>FIX THE FOLLOWING BEFORE CONTINUING</Text>
|
|
63
|
-
<View style={{ padding:10 }}>
|
|
64
|
-
{errors.map((e,i) => {
|
|
65
|
-
return (
|
|
66
|
-
<Text style={{ padding:2 }} theme='warning'>{i+1} - {e}</Text>
|
|
67
|
-
)
|
|
68
|
-
})}
|
|
69
|
-
</View>
|
|
70
|
-
</View>
|
|
71
|
-
}
|
|
72
|
-
</View>
|
|
54
|
+
<View style={{ flex:1 }}>
|
|
55
|
+
<FlatList
|
|
56
|
+
data={sections}
|
|
57
|
+
key={'status_sections'}
|
|
58
|
+
keyExtractor={(item) => item}
|
|
59
|
+
renderItem={renderSections}
|
|
60
|
+
/>
|
|
61
|
+
</View>
|
|
62
|
+
<View type='header' style={{ padding:10 }}>
|
|
63
|
+
<View transparent style={{ padding:10, flexDirection:'row', borderBottomWidth:1, borderColor:C.borders.light }}>
|
|
64
|
+
<Icons.CheckCirlceIcon color={C.text.success} size={32}/>
|
|
65
|
+
<View transparent style={{ flex:1, marginLeft:20 }}>
|
|
66
|
+
<Text theme='h1'>FREE TO PLAY - ENGAGED!</Text>
|
|
67
|
+
<Text style={{ marginTop:5 }} theme='h2'>Your profile is ready to go for play money betting and all our FREE TO PLAY games.</Text>
|
|
73
68
|
</View>
|
|
69
|
+
</View>
|
|
70
|
+
{player.vouched_status != 'verified' ?
|
|
71
|
+
<View transparent style={{ padding:10, flexDirection:'row' }}>
|
|
72
|
+
<Icons.AlertIcon color={C.text.warning} size={32}/>
|
|
73
|
+
<View transparent style={{ flex:1, marginLeft:20 }}>
|
|
74
|
+
|
|
75
|
+
<Text theme='h1'>WANT TO USE REAL MONEY?</Text>
|
|
76
|
+
{errors.length == 0 ?
|
|
77
|
+
<Text style={{ marginTop:5 }} theme='description'>Continue on your journey and complete the verification steps in just a couple minutes.</Text>
|
|
74
78
|
:
|
|
75
|
-
<View style={{
|
|
76
|
-
<
|
|
77
|
-
<View style={{
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
<View transparent style={{ marginTop:5 }}>
|
|
80
|
+
<Text size={14} theme='warning'>FIX THE FOLLOWING BEFORE CONTINUING</Text>
|
|
81
|
+
<View transparent style={{ padding:10 }}>
|
|
82
|
+
{errors.map((e,i) => {
|
|
83
|
+
return (
|
|
84
|
+
<Text style={{ padding:2 }} theme='warning'>{i+1} - {e}</Text>
|
|
85
|
+
)
|
|
86
|
+
})}
|
|
80
87
|
</View>
|
|
81
|
-
</View>
|
|
88
|
+
</View>
|
|
82
89
|
}
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
</View>
|
|
91
|
+
</View>
|
|
92
|
+
:
|
|
93
|
+
<View style={{ padding:10, flexDirection:'row' }}>
|
|
94
|
+
<Icons.CheckCirlceIcon color={C.text.success} size={32}/>
|
|
95
|
+
<View style={{ flex:1, marginLeft:20 }}>
|
|
96
|
+
<Text theme='h1'>REAL MONEY - ENGAGED!</Text>
|
|
97
|
+
<Text style={{ marginTop:5 }} theme='h2'>Way to go! Your profile is ready to go for real-money activities!</Text>
|
|
98
|
+
</View>
|
|
99
|
+
</View>
|
|
100
|
+
}
|
|
101
|
+
</View>
|
|
85
102
|
{code_request && !['closed','fulfilled'].includes(code_request.status) && promo ?
|
|
86
|
-
<View float style={{ margin:15,
|
|
103
|
+
<View float style={{ margin:15, flexDirection:'row' }}>
|
|
87
104
|
<View transparent style={{ padding:10, justifyContent:'center' }}>
|
|
88
105
|
<Icons.GiftIcon size={40} color={C.text.gold} />
|
|
89
106
|
</View>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { ActivityIndicator,
|
|
2
|
+
import { ActivityIndicator, FlatList, Image } from 'react-native';
|
|
3
3
|
import { Icons } from '../../Components';
|
|
4
4
|
import { ProfileApi, ProfileHelpers } from '../api';
|
|
5
5
|
import type { CodeRequestProps, FocusPositionProps, MyPlayerProps, PlayerReferralProps, PromoProps, PublicPlayerProps, RewardOptionProps } from '../../types';
|
|
@@ -21,6 +21,7 @@ type CodeRedeemProps = {
|
|
|
21
21
|
onClose:() => void
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
const sections = ['header','code_used','redeemed','referrer']
|
|
24
25
|
const CodeRedeem = ({ walkthrough, onVerify, onClose, onRedeemCode, onFocusPosition }:CodeRedeemProps) => {
|
|
25
26
|
const C = useColors();
|
|
26
27
|
const [ loading, setLoading ] = useState(false);
|
|
@@ -72,118 +73,135 @@ const CodeRedeem = ({ walkthrough, onVerify, onClose, onRedeemCode, onFocusPosit
|
|
|
72
73
|
}, 2000);
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if(loading){
|
|
78
|
-
return (
|
|
79
|
-
<ActivityIndicator size='large' color={C.text.h1} style={{ padding:40, alignSelf:'center' }} />
|
|
80
|
-
)
|
|
81
|
-
}
|
|
82
|
-
|
|
83
76
|
const is_changed = draft_code && draft_code.toLowerCase() != code_request?.referral_code.toLowerCase() ? true : false
|
|
84
|
-
console.log(code_request?.referral_code);
|
|
85
77
|
const try_allowed = draft_code ? true : false
|
|
86
78
|
const change_allowed = !loading && ProfileHelpers.isChangeCodeAllowed(code_request) ? true : false
|
|
87
|
-
return (
|
|
88
|
-
<TouchableWithoutFeedback style={{ flex:1 }} onPress={() => Keyboard.dismiss()}>
|
|
89
79
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
80
|
+
|
|
81
|
+
const renderSections = (data:{item:string, index:number}) => {
|
|
82
|
+
switch(data.item){
|
|
83
|
+
case 'header':
|
|
84
|
+
return (
|
|
85
|
+
<View style={{ padding:20 }}>
|
|
86
|
+
<Text size={26} theme='h1'>How Did You Find Us?</Text>
|
|
87
|
+
<Text style={{ marginTop:15 }} size={14} theme='h2'>All new players are eligible for a one-time sign up bonus. Below is the code / referrer used during sign up.</Text>
|
|
88
|
+
</View>
|
|
89
|
+
)
|
|
90
|
+
case 'code_used':
|
|
91
|
+
return (
|
|
92
|
+
<View style={{ padding:10, marginTop:20 }}>
|
|
93
|
+
<Text size={20} theme='h1' textAlign='center'>CODE USED</Text>
|
|
94
|
+
<Text size={14} theme='description' style={{ marginTop:4 }} textAlign='center'>Enter / change the code below</Text>
|
|
95
|
+
<View type='input' style={{ marginTop:20, flexDirection:'row', alignItems:'center' }}>
|
|
96
|
+
<View transparent style={{ paddingLeft:15, paddingRight:15 }}>
|
|
97
|
+
<Icons.USDIcon
|
|
98
|
+
color={C.text.h1}
|
|
99
|
+
size={18}
|
|
100
|
+
/>
|
|
101
|
+
</View>
|
|
102
|
+
<TextInput
|
|
103
|
+
|
|
104
|
+
value={draft_code}
|
|
105
|
+
onFocusPosition={onFocusPosition}
|
|
106
|
+
style={{ flex:1, textAlign: 'center' }}
|
|
107
|
+
placeholder='Add Code Here'
|
|
108
|
+
editable={change_allowed}
|
|
109
|
+
transparent
|
|
110
|
+
onChangeText={(text) => setDraftCode(text)}
|
|
104
111
|
/>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
value={draft_code}
|
|
109
|
-
onFocusPosition={onFocusPosition}
|
|
110
|
-
style={{ flex:1, textAlign: 'center' }}
|
|
111
|
-
placeholder='Add Code Here'
|
|
112
|
-
editable={change_allowed}
|
|
113
|
-
transparent
|
|
114
|
-
onChangeText={(text) => setDraftCode(text)}
|
|
115
|
-
/>
|
|
116
|
-
<View transparent style={{ paddingLeft:15, paddingRight:15 }}>
|
|
117
|
-
{loading ?
|
|
118
|
-
<ActivityIndicator size='small' color={C.text.h1}/>
|
|
119
|
-
:
|
|
120
|
-
<View transparent>
|
|
121
|
-
{ !is_changed && draft_code ?
|
|
122
|
-
<Icons.CheckIcon size={16} color={C.text.success} />
|
|
123
|
-
: code_error ?
|
|
124
|
-
<Icons.AlertIcon size={16} color={C.text.warning} />
|
|
112
|
+
<View transparent style={{ paddingLeft:15, paddingRight:15 }}>
|
|
113
|
+
{loading ?
|
|
114
|
+
<ActivityIndicator size='small' color={C.text.h1}/>
|
|
125
115
|
:
|
|
126
|
-
<
|
|
116
|
+
<View transparent>
|
|
117
|
+
{ !is_changed && draft_code ?
|
|
118
|
+
<Icons.CheckIcon size={16} color={C.text.success} />
|
|
119
|
+
: code_error ?
|
|
120
|
+
<Icons.AlertIcon size={16} color={C.text.warning} />
|
|
121
|
+
:
|
|
122
|
+
<Icons.CloseIcon size={14} color={C.text.error} />
|
|
123
|
+
}
|
|
124
|
+
</View>
|
|
127
125
|
}
|
|
128
126
|
</View>
|
|
129
|
-
}
|
|
130
127
|
</View>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
<Text style={{ padding:5 }} theme='error' textAlign='center'>{code_error}</Text>
|
|
134
|
-
:<></>}
|
|
135
|
-
{is_changed ?
|
|
136
|
-
<Button
|
|
137
|
-
title='Apply Code'
|
|
138
|
-
style={{ marginTop:20, opacity:try_allowed?1:0.5 }}
|
|
139
|
-
disabled={!try_allowed}
|
|
140
|
-
onPress={() => handleTryCodeRequest()}
|
|
141
|
-
type='success'
|
|
142
|
-
|
|
143
|
-
/>
|
|
128
|
+
{code_error ?
|
|
129
|
+
<Text style={{ padding:5 }} theme='error' textAlign='center'>{code_error}</Text>
|
|
144
130
|
:<></>}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
</View>
|
|
158
|
-
:
|
|
159
|
-
<View float style={{ padding:10, marginTop:20 }}>
|
|
160
|
-
<Text size={20} theme='h1' textAlign='center'>CODE REDEEMED</Text>
|
|
161
|
-
{reward_option ?
|
|
162
|
-
<View transparent style={{ marginTop:10, padding:10, borderRadius:8 }}>
|
|
163
|
-
<Text size={14} theme='h2'>AWARDED: {reward_option.reward_name}</Text>
|
|
164
|
-
{code_request && promo && ['referral_sweepstakes','referral_code'].includes(promo.type) ?
|
|
165
|
-
<Text style={{ marginTop:10 }} theme='h2'>KICKBACK STATUS: {code_request.status == 'fulfilled' ? 'Referrer will get the same reward amount after you make your first deposit': 'Kickback received'}</Text>
|
|
131
|
+
{is_changed ?
|
|
132
|
+
<Button
|
|
133
|
+
title='Apply Code'
|
|
134
|
+
style={{ marginTop:20, opacity:try_allowed?1:0.5 }}
|
|
135
|
+
disabled={!try_allowed}
|
|
136
|
+
onPress={() => handleTryCodeRequest()}
|
|
137
|
+
type='success'
|
|
138
|
+
|
|
139
|
+
/>
|
|
140
|
+
:<></>}
|
|
141
|
+
{false ?
|
|
142
|
+
<Text theme='warning'>{'ERROR GOES HERE'}</Text>
|
|
166
143
|
:<></>}
|
|
167
144
|
</View>
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
145
|
+
)
|
|
146
|
+
case 'redeemed':
|
|
147
|
+
return (
|
|
148
|
+
<View style={{ padding:20 }}>
|
|
149
|
+
{!reward_option ?
|
|
150
|
+
<View float style={{ padding:10, marginTop:20 }}>
|
|
151
|
+
<Text size={20} weight='bold' textAlign='center' theme='h1'>CODE OFFER</Text>
|
|
152
|
+
{promo ?
|
|
153
|
+
<View transparent style={{ marginTop:20, borderRadius:8, padding:10 }}>
|
|
154
|
+
<Text style={{ marginTop:5 }} theme='description' textAlign='center'>{ProfileHelpers.getReferralDescription(promo)}</Text>
|
|
155
|
+
</View>
|
|
156
|
+
:<></>}
|
|
157
|
+
</View>
|
|
158
|
+
:
|
|
159
|
+
<View float style={{ padding:10, marginTop:20 }}>
|
|
160
|
+
<Text size={20} theme='h1' textAlign='center'>CODE REDEEMED</Text>
|
|
161
|
+
{reward_option ?
|
|
162
|
+
<View transparent style={{ marginTop:10, padding:10, borderRadius:8 }}>
|
|
163
|
+
<Text size={14} theme='h2'>AWARDED: {reward_option.reward_name}</Text>
|
|
164
|
+
{code_request && promo && ['referral_sweepstakes','referral_code'].includes(promo.type) ?
|
|
165
|
+
<Text style={{ marginTop:10 }} theme='h2'>KICKBACK STATUS: {code_request.status == 'fulfilled' ? 'Referrer will get the same reward amount after you make your first deposit': 'Kickback received'}</Text>
|
|
166
|
+
:<></>}
|
|
167
|
+
</View>
|
|
168
|
+
:<></>}
|
|
183
169
|
</View>
|
|
170
|
+
}
|
|
184
171
|
</View>
|
|
185
|
-
|
|
186
|
-
|
|
172
|
+
)
|
|
173
|
+
case 'referrer':
|
|
174
|
+
if(!referrer){ return <></> }
|
|
175
|
+
return (
|
|
176
|
+
<View float style={{ margin:20, padding:5 }}>
|
|
177
|
+
<View nativeID='referrer_details' style={{ flexDirection:'row', padding:5}}>
|
|
178
|
+
<Image
|
|
179
|
+
source={{ uri:referrer.profile_pic }}
|
|
180
|
+
style={{ height:50, width:50, borderRadius:8 }}
|
|
181
|
+
resizeMode='cover'
|
|
182
|
+
/>
|
|
183
|
+
<View style={{ flex:1, marginLeft:20 }}>
|
|
184
|
+
<Text size={16} theme='h1'>Referred By: {referrer.first_name} {referrer.last_name}</Text>
|
|
185
|
+
<Text style={{ marginTop:5 }} theme='description'>@{referrer.username}</Text>
|
|
186
|
+
</View>
|
|
187
|
+
</View>
|
|
188
|
+
</View>
|
|
189
|
+
)
|
|
190
|
+
default: return <></>
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
return (
|
|
196
|
+
<View style={{ flex:1 }}>
|
|
197
|
+
<View style={{ flex:1 }}>
|
|
198
|
+
<FlatList
|
|
199
|
+
data={sections}
|
|
200
|
+
key={'code_sections'}
|
|
201
|
+
keyExtractor={item => item}
|
|
202
|
+
renderItem={renderSections}
|
|
203
|
+
/>
|
|
204
|
+
</View>
|
|
187
205
|
<View style={{ flexDirection:'row', padding:10 }}>
|
|
188
206
|
<Button
|
|
189
207
|
title={walkthrough ? 'SKIP' : 'CLOSE'}
|
|
@@ -241,7 +259,6 @@ const CodeRedeem = ({ walkthrough, onVerify, onClose, onRedeemCode, onFocusPosit
|
|
|
241
259
|
</View>
|
|
242
260
|
:<></>}
|
|
243
261
|
</View>
|
|
244
|
-
</TouchableWithoutFeedback>
|
|
245
262
|
)
|
|
246
263
|
}
|
|
247
264
|
|