mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-10 06:54:44 +00:00
ok this should fix
This commit is contained in:
parent
390f3d9c4d
commit
f0c0d646b5
@ -13,6 +13,7 @@ function closeNav() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
|
var promise1 = new Promise(function(resolve, reject) {
|
||||||
document.getElementById('sideload').style.display = 'block';
|
document.getElementById('sideload').style.display = 'block';
|
||||||
var config = {
|
var config = {
|
||||||
apiKey: "(insert the TitanScout Api Key Here)",
|
apiKey: "(insert the TitanScout Api Key Here)",
|
||||||
@ -24,7 +25,9 @@ window.onload = function() {
|
|||||||
};
|
};
|
||||||
firebase.initializeApp(config);
|
firebase.initializeApp(config);
|
||||||
user = firebase.auth().currentUser
|
user = firebase.auth().currentUser
|
||||||
setTimeout(function() {
|
resolve(user)
|
||||||
|
});
|
||||||
|
promise1.then(function(user) {
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
if (user.displayName != null) {
|
if (user.displayName != null) {
|
||||||
document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
|
document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
|
||||||
@ -37,6 +40,6 @@ window.onload = function() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
window.location.replace('../');
|
window.location.replace('../');
|
||||||
}, 10)
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user