Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { DrawerActions } from "react-navigation"; //Import it on top
- ....other code
- signUserOut = () => {
- firebase.auth().signOut()
- .then( response => {
- this.dropDownAlert.alertWithType( "success", "Success", "Signed out successfully", null, 2000 );
- setTimeout( () => {
- this.props.navigation.dispatch(DrawerActions.closeDrawer());
- }, 2500 );
- } )
- .catch( error => {
- console.log( "Error signing out:", error );
- this.dropDownAlert.alertWithType( "error", "Error", "Failed signing out. Please, try again.", null, 2000 );
- } );
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement