Skip to content

Commit

Permalink
Double check if not signout
Browse files Browse the repository at this point in the history
  • Loading branch information
aryaminus committed Dec 5, 2017
1 parent 51b8f07 commit 468686c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/components/Boiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default class Boiler extends Component {
onPress={() =>
this.props.navigation.navigate("GloChat", {
name: this.state.name
})}
})
}
>
Chat Room
</Text>
Expand All @@ -67,12 +68,17 @@ export default class Boiler extends Component {
.signOut()
.then(
() => {
this.props.navigation.navigate("Login");
firebase.auth().onAuthStateChanged(user => {
if (user) {
firebase.auth().signOut();
}
});
},
function(error) {
// An error happened.
}
);
this.props.navigation.navigate("Login");
}}
>
Log out
Expand Down

0 comments on commit 468686c

Please sign in to comment.