import React, {useState, useContext} from 'react'; import {AuthContext} from '../context/AuthContext'; import StartLoading from '../screens/StartLoading'; import {NavigationContainer} from '@react-navigation/native'; import DrawerNavigate from './DrawerNavigate'; import AuthStack from './AuthStack'; export default function AppNav() { const {userToken} = useContext(AuthContext); const [isLoading, setIsLoading] = useState(true); setTimeout(() => { setIsLoading(false); }, 3000); return ( { isLoading ? ( ) : ( // : userToken !== null ? ) // : ( // // ) } ); }