diff options
| author | Kumar Priyansh <[email protected]> | 2019-06-09 19:52:53 +0530 |
|---|---|---|
| committer | Kumar Priyansh <[email protected]> | 2019-06-09 19:52:53 +0530 |
| commit | 7485c7aca1e7135ccb74201a0e5e5cf75eecbdef (patch) | |
| tree | d420c61a03e517792bed3a882101ed3f63b59cea /shared | |
| parent | c6e8231b317c3104f49222b1628f2d7287de13a8 (diff) | |
| download | firebase-ecommerce-master.tar.xz firebase-ecommerce-master.zip | |
Diffstat (limited to 'shared')
| -rw-r--r-- | shared/css/main.css | 6 | ||||
| -rw-r--r-- | shared/js/Dashboard.js | 16 |
2 files changed, 10 insertions, 12 deletions
diff --git a/shared/css/main.css b/shared/css/main.css index 5b21812..831ec8a 100644 --- a/shared/css/main.css +++ b/shared/css/main.css @@ -68,4 +68,10 @@ } .recents { padding: 1.5rem; +} +#sign { + display: block; +} +#signed { + display: none; }
\ No newline at end of file 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; |
