Skip to content

Commit

Permalink
Update Static.js
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed Nov 28, 2023
1 parent e9ec865 commit a07cc5e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Static.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Static extends React.Component {
window.setImportStatus = this.setImportStatus.bind(this);
window.setTotalLoadingTime = this.setTotalLoadingTime.bind(this);
window.setEnableSignInButton = this.setEnableSignInButton.bind(this);
window.handleSignInStateChange = this.handleSignInStateChange.bind(this);
}

componentDidMount() {
Expand Down Expand Up @@ -191,6 +192,21 @@ class Static extends React.Component {
}
}

//Handles changes to auth status on splash screen
handleSignInStateChange(auth) {
let btn = document.getElementById('btnSignIn');

this.setState({
signInStatus:auth.status === 'True'
});

if (auth.status === 'True'){
btn.innerHTML = this.props.signOutTitle
}else{
btn.innerHTML = this.props.signInTitle
}
}

//Every time the checkbox is clicked, this method is called
handleChange() {
checked = !checked;
Expand Down

0 comments on commit a07cc5e

Please sign in to comment.