SHARE
TWEET

Untitled

a guest Jun 24th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { DrawerActions } from "react-navigation"; //Import it on top
  2.  
  3. ....other code
  4.  
  5. signUserOut = () => {
  6.       firebase.auth().signOut()
  7.         .then( response => {
  8.           this.dropDownAlert.alertWithType( "success", "Success", "Signed out successfully", null, 2000 );
  9.  
  10.           setTimeout( () => {
  11.             this.props.navigation.dispatch(DrawerActions.closeDrawer());
  12.           }, 2500 );
  13.         } )
  14.         .catch( error => {
  15.           console.log( "Error signing out:", error );
  16.           this.dropDownAlert.alertWithType( "error", "Error", "Failed signing out. Please, try again.", null, 2000 );
  17.         } );
  18.     };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top