Skip to content

Commit

Permalink
Release 1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Garnier committed Mar 28, 2018
1 parent 009284e commit c8b0d9c
Show file tree
Hide file tree
Showing 11 changed files with 9,127 additions and 1,035 deletions.
36 changes: 27 additions & 9 deletions dist/FirebaseAuth.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/FirebaseAuth.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class SignInScreen extends React.Component {

// The component's Local state.
state = {
signedIn: false // Local signed-in state.
isSignedIn: false // Local signed-in state.
};

// Configure FirebaseUI.
Expand All @@ -126,13 +126,18 @@ class SignInScreen extends React.Component {

// Listen to the Firebase Auth state and set the local state.
componentDidMount() {
firebase.auth().onAuthStateChanged(
(user) => this.setState({signedIn: !!user})
this.unregisterAuthObserver = firebase.auth().onAuthStateChanged(
(user) => this.setState({isSignedIn: !!user})
);
}

// Make sure we un-register Firebase observers when the component unmounts.
componentWillUnmount() {
this.unregisterAuthObserver();
}

render() {
if (!this.state.signedIn) {
if (!this.state.isSignedIn) {
return (
<div>
<h1>My App</h1>
Expand Down
2 changes: 1 addition & 1 deletion dist/StyledFirebaseAuth.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/StyledFirebaseAuth.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit c8b0d9c

Please sign in to comment.