Open yashimaskara opened 3 years ago
const MyAccountfunc= async ({navigation})=>{ let user = await AsyncStorage.getItem('user'); //it is showing error here alert(user); //my user contains one mail if(user==null) { alert('Login first') navigation.navigate('Login')
} else{ alert('done') navigation.navigate('MyAccount')
} return null }
const DrawerNavigation = createDrawerNavigator(
{
"Home": App, "My Account": MyAccountfunc, "Order History": OrderHistory, "About us": Aboutus, "Contact us": Contactus, "Logout": LogoutFunc
}, { initialRouteName: "Home", contentOptions: { activeTintColor: "red" } } );
export default createAppContainer(DrawerNavigation);
const MyAccountfunc= async ({navigation})=>{ let user = await AsyncStorage.getItem('user'); //it is showing error here alert(user); //my user contains one mail if(user==null) { alert('Login first') navigation.navigate('Login')
} else{ alert('done') navigation.navigate('MyAccount')
} return null }
const DrawerNavigation = createDrawerNavigator(
{
}, { initialRouteName: "Home", contentOptions: { activeTintColor: "red" } } );
export default createAppContainer(DrawerNavigation);