Преглед изворни кода

update logout to clean the localstorage

Daniel Bohry пре 9 месеци
родитељ
комит
915c12253d
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      src/routes/logout/+page.svelte

+ 2 - 0
src/routes/logout/+page.svelte

@@ -3,6 +3,8 @@
     import {authentication} from '../store.js';
 
     function logout() {
+        localStorage.removeItem('authentication');
+        authentication.set(null);
         localStorage.clear();
         window.location.href = "/login";
     }