-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAuthScreen.js
30 lines (26 loc) · 904 Bytes
/
AuthScreen.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React, {useState} from 'react';
import {SafeAreaView} from 'react-native';
import LoginScreen from '../src/components/AuthPages/Login';
import RegisterScreen from '../src/components/AuthPages/Register';
import SplashScreen from '../src/components/SplashScreen';
import useAuth from '../src/hooks/useAuth';
const AuthScreen = ({navigation}) => {
const [isTextDontHaveAccount, setIsTextDontHaveAccount] = useState(false);
const {isnotAuth, isAuthenticated, ismanipAuth} = useAuth();
// if (isnotAuth) {
// return <SplashScreen />;
// }
return (
<SafeAreaView>
{!isTextDontHaveAccount ? (
<LoginScreen
setIsTextDontHaveAccount={setIsTextDontHaveAccount}
navigation={navigation}
/>
) : (
<RegisterScreen setIsTextDontHaveAccount={setIsTextDontHaveAccount} />
)}
</SafeAreaView>
);
};
export default AuthScreen;