From 4f3ecf436162dfdf24cbdccc040aac188b4f1fd9 Mon Sep 17 00:00:00 2001 From: Jacob Levine Date: Tue, 12 Feb 2019 20:37:50 -0600 Subject: [PATCH] fix more typos --- website/public/team/scripts.js | 55 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/website/public/team/scripts.js b/website/public/team/scripts.js index 46617800..6a5cb57f 100644 --- a/website/public/team/scripts.js +++ b/website/public/team/scripts.js @@ -30,37 +30,36 @@ window.onload = function() { }; firebase.initializeApp(config); firebase.auth().onAuthStateChanged(function(user) { - if (user != null) { - if (user.displayName != null) { - document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName; - document.getElementById('newDN').innerHTML = 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."; - } - if (user.email != null) { - document.getElementById('newEM').innerHTML = user.email; + if (user != null) { + if (user.displayName != null) { + document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName; + document.getElementById('newDN').innerHTML = 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."; + } + if (user.email != null) { + document.getElementById('newEM').innerHTML = user.email; + } + } else { + window.location.replace('../'); + } + teamAssoc = firebase.firestore().collections('UserAssociations').doc(user.uid); + teamAssoc.get().then(function(doc) { + if (doc.exists) { + list = doc.data() + teamNums = Object.keys(list) + document.getElementById(teammem).innerHTML = "" + for i in teamNums() { + document.getElementById(teammem).innerHTML += "" + i + "" + list.i + "" } } else { - window.location.replace('../'); + document.getElementById(teammem).innerHTML = "You are not part of any teams" } - teamAssoc = firebase.firestore().collections('UserAssociations').doc(user.uid); - teamAssoc.get().then(function(doc) { - if (doc.exists) - } { - list = doc.data() - teamNums = Object.keys(list) - document.getElementById(teammem).innerHTML = "" - for i in teamNums() { - document.getElementById(teammem).innerHTML += "" + i + "" + list.i + "" - } - } else { - document.getElementById(teammem).innerHTML = "You are not part of any teams" - } - }) + }) }); }