From a07cc5eea6328b7b69c5cfee51eb260b9466d27d Mon Sep 17 00:00:00 2001 From: Ashish Aggarwal Date: Tue, 28 Nov 2023 18:09:37 -0500 Subject: [PATCH] Update Static.js --- src/Static.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Static.js b/src/Static.js index f51ee5a..7c9725d 100644 --- a/src/Static.js +++ b/src/Static.js @@ -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() { @@ -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;