Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  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. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement