testing signout logic

This commit is contained in:
Jacob Levine 2019-02-09 11:27:46 -06:00
parent 82231cb04b
commit 192d023325
2 changed files with 16 additions and 0 deletions

View File

@ -24,6 +24,7 @@
<img id="sideload" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b2/Hamburger_icon.svg/1200px-Hamburger_icon.svg.png">
</span>
<h1 id="mainhead">TitanScout- Torunament Statistics</h1>
<p id="status">You are not signed in.</p>
</div>
</body>
</html>

View File

@ -14,4 +14,19 @@ function closeNav() {
window.onload=function(){
document.getElementById('sideload').style.display = 'block';
user= firebase.auth().currentUser
if (user != null) {
if (user.displayName != null) {
document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
} else if (user.email != null) {
document.getElementById('status').innerHTML = "You are signed in as: " + user.email;
} else if (user.phoneNumber != null) {
document.getElementById('status').innerHTML = "You are signed in as: " + user.phoneNumber;
} else {
document.getElementById('status').innerHTML = "You are signed in.";
}
}else{
window.location.replace('../');
}
}