Skip to content

Commit e00dc80

Browse files
author
Nicolas Garnier
committed
Tweak on the example app to avoid showing the firebaseUI widget if the user is already signed-in (while waiting for us to know the auth state).
1 parent c8b0d9c commit e00dc80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

example/src/App.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class App extends React.Component {
4949
};
5050

5151
state = {
52-
isSignedIn: false,
52+
isSignedIn: undefined,
5353
};
5454

5555
/**
@@ -78,7 +78,7 @@ class App extends React.Component {
7878
<i className={styles.logoIcon + ' material-icons'}>photo</i> My App
7979
</div>
8080
<div className={styles.caption}>This is a cool demo app</div>
81-
{!this.state.isSignedIn &&
81+
{this.state.isSignedIn !== undefined && !this.state.isSignedIn &&
8282
<div>
8383
<StyledFirebaseAuth className={styles.firebaseUi} uiConfig={this.uiConfig}
8484
firebaseAuth={firebaseApp.auth()}/>

0 commit comments

Comments
 (0)