aboutsummaryrefslogtreecommitdiff
path: root/shared/js
diff options
context:
space:
mode:
authorKumar Priyansh <[email protected]>2019-06-09 19:52:53 +0530
committerKumar Priyansh <[email protected]>2019-06-09 19:52:53 +0530
commit7485c7aca1e7135ccb74201a0e5e5cf75eecbdef (patch)
treed420c61a03e517792bed3a882101ed3f63b59cea /shared/js
parentc6e8231b317c3104f49222b1628f2d7287de13a8 (diff)
downloadfirebase-ecommerce-7485c7aca1e7135ccb74201a0e5e5cf75eecbdef.tar.xz
firebase-ecommerce-7485c7aca1e7135ccb74201a0e5e5cf75eecbdef.zip
Updated Login and Logged in FunctionsHEADmaster
Diffstat (limited to 'shared/js')
-rw-r--r--shared/js/Dashboard.js16
1 files changed, 4 insertions, 12 deletions
diff --git a/shared/js/Dashboard.js b/shared/js/Dashboard.js
index 2135fed..d67299d 100644
--- a/shared/js/Dashboard.js
+++ b/shared/js/Dashboard.js
@@ -1,14 +1,4 @@
$(document).ready(function(){
- function showAlert(message) {
- // Get the snackbar DIV
- var x = document.getElementById("snackbar");
- $('#snackbar').text(message)
- // Add the "show" class to DIV
- x.className = "show";
-
- // After 3 seconds, remove the show class from DIV
- setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
- }
$('#signout').click(function(){
firebase.auth().signOut().then(function() {
window.location.replace('../')
@@ -17,8 +7,10 @@ $(document).ready(function(){
});
})
firebase.auth().onAuthStateChanged(function(user) {
- if (!user) {
- window.location.replace('../')
+ if (user) {
+ console.log(user)
+ $("#sign").hide()
+ $("#signed").show()
}
});
// var url = window.location.href;