1
- import React , { useState } from 'react' ;
1
+ import React , { useState } from 'react' ;
2
2
import {
3
3
StyleSheet ,
4
4
View ,
@@ -13,13 +13,13 @@ import Checkbox from 'react-native-check-box';
13
13
import Header from '../../shared/Header' ;
14
14
import LongCard from '../../shared/LongCard' ;
15
15
import FlatButton from '../../shared/Button.js' ;
16
- import { gStyles } from '../../styles/global' ;
17
- import { Formik } from 'formik' ;
16
+ import { gStyles } from '../../styles/global' ;
17
+ import { Formik } from 'formik' ;
18
18
import * as yup from 'yup' ;
19
19
import Stepper from '../../shared/Stepper' ;
20
20
21
- import { signup , setLoading } from '../../redux/authActions' ;
22
- import { connect } from 'react-redux' ;
21
+ import { signup , setLoading } from '../../redux/authActions' ;
22
+ import { connect } from 'react-redux' ;
23
23
24
24
// import MaterialIcons from 'react-native-vector-icons/FontAwesome';
25
25
const AccountInfo = ( props ) => {
@@ -28,7 +28,7 @@ const AccountInfo = (props) => {
28
28
29
29
const handleSubmit = ( values ) => {
30
30
signupFunction (
31
- Object . assign ( { isActivated : true } , values , props . route . params ) ,
31
+ Object . assign ( { isActivated : true } , values , props . route . params ) ,
32
32
) ;
33
33
} ;
34
34
@@ -46,9 +46,14 @@ const AccountInfo = (props) => {
46
46
}
47
47
} ;
48
48
49
- const navigateToSampleScreen = ( ) => {
49
+ const navigateToSampleScreen = ( body ) => {
50
50
// props.navigation.goBack();
51
- props . navigation . navigate ( 'SellerBio' ) ;
51
+ props . navigation . navigate ( 'SellerBio' , {
52
+ ...props . route . params ,
53
+ name : body . name ,
54
+ email : body . email ,
55
+ password : body . password ,
56
+ } ) ;
52
57
} ;
53
58
54
59
const reviewSchema = yup . object ( {
@@ -99,7 +104,11 @@ const AccountInfo = (props) => {
99
104
validationSchema = { reviewSchema }
100
105
onSubmit = { ( values , actions ) => {
101
106
if ( props . route . params . userType == 'seller' ) {
102
- navigateToSampleScreen ( ) ;
107
+ navigateToSampleScreen ( {
108
+ name : values . name ,
109
+ email : values . email ,
110
+ password : values . password ,
111
+ } ) ;
103
112
} else {
104
113
handleSubmit ( {
105
114
name : values . name ,
@@ -126,7 +135,7 @@ const AccountInfo = (props) => {
126
135
alignContent : 'space-around' ,
127
136
marginBottom : 5 ,
128
137
} } >
129
- < View style = { { marginBottom : 7 } } >
138
+ < View style = { { marginBottom : 7 } } >
130
139
< View
131
140
style = { {
132
141
flexDirection : 'row' ,
@@ -156,7 +165,7 @@ const AccountInfo = (props) => {
156
165
/>
157
166
{ /* {propss.errors.name && propss.touched.name ? ( */ }
158
167
< View >
159
- < Text style = { { color : 'red' } } >
168
+ < Text style = { { color : 'red' } } >
160
169
{ propss . errors . name && propss . touched . name
161
170
? propss . errors . name
162
171
: '' }
@@ -167,7 +176,7 @@ const AccountInfo = (props) => {
167
176
</ View >
168
177
</ View >
169
178
170
- < View style = { { marginBottom : 7 } } >
179
+ < View style = { { marginBottom : 7 } } >
171
180
< View
172
181
style = { {
173
182
flexDirection : 'row' ,
@@ -196,7 +205,7 @@ const AccountInfo = (props) => {
196
205
/>
197
206
{ /* {propss.errors.email && propss.touched.email ? ( */ }
198
207
< View >
199
- < Text style = { { color : 'red' } } >
208
+ < Text style = { { color : 'red' } } >
200
209
{ propss . errors . email && propss . touched . email
201
210
? propss . errors . email
202
211
: '' }
@@ -207,7 +216,7 @@ const AccountInfo = (props) => {
207
216
</ View >
208
217
</ View >
209
218
210
- < View style = { { marginBottom : 7 } } >
219
+ < View style = { { marginBottom : 7 } } >
211
220
< View
212
221
style = { {
213
222
flexDirection : 'row' ,
@@ -253,7 +262,7 @@ const AccountInfo = (props) => {
253
262
</ View >
254
263
</ View >
255
264
256
- < View style = { { marginBottom : 7 } } >
265
+ < View style = { { marginBottom : 7 } } >
257
266
< View
258
267
style = { {
259
268
flexDirection : 'row' ,
@@ -272,7 +281,7 @@ const AccountInfo = (props) => {
272
281
< TextInput
273
282
style = {
274
283
propss . errors . passwordConfirmation &&
275
- propss . touched . passwordConfirmation
284
+ propss . touched . passwordConfirmation
276
285
? styles . errorInput
277
286
: styles . input
278
287
}
@@ -293,7 +302,7 @@ const AccountInfo = (props) => {
293
302
color : 'red' ,
294
303
} } >
295
304
{ propss . errors . passwordConfirmation &&
296
- propss . touched . passwordConfirmation
305
+ propss . touched . passwordConfirmation
297
306
? propss . errors . passwordConfirmation
298
307
: '' }
299
308
</ Text >
0 commit comments