@@ -11,9 +11,10 @@ import { isValidPassword } from '../../Utils/DataVerify';
11
11
import Styles from '../../Styles/Styles' ;
12
12
import SignUpStyle from '../../Styles/SignUpStyle' ;
13
13
14
- const PasswordScreen = ( { SignUpData } ) =>
14
+ const PasswordScreen = ( { navigation , route } ) =>
15
15
{
16
- const navigation = useNavigation ( ) ;
16
+ const { SignUpData } = route . params ;
17
+
17
18
const [ password , setPassword ] = useState ( '' ) ;
18
19
19
20
const backArrow = ( ) => {
@@ -26,8 +27,8 @@ const PasswordScreen = ({ SignUpData }) =>
26
27
let isPasswordValid = isValidPassword ( password )
27
28
if ( isPasswordValid . isValid )
28
29
{
29
- SignUpData . password = password ;
30
- navigation . navigate ( 'AgeScreen' , { SignUpData } ) ;
30
+ const updatedSignUpData = { ... SignUpData , password } ;
31
+ navigation . navigate ( 'AgeScreen' , { SignUpData : updatedSignUpData } ) ;
31
32
}
32
33
else
33
34
{
@@ -49,6 +50,7 @@ const PasswordScreen = ({ SignUpData }) =>
49
50
placeholder = "Password"
50
51
value = { password }
51
52
onChangeText = { setPassword }
53
+ secureTextEntry = { true }
52
54
style = { {
53
55
container : SignUpStyle . input ,
54
56
heading : SignUpStyle . heading ,
0 commit comments