vvandenb 2 years ago
parent
commit
7dd607989e
  1. 3
      front/volume/src/App.svelte
  2. 6
      front/volume/src/Auth.ts

3
front/volume/src/App.svelte

@ -20,6 +20,9 @@
onMount(() => { onMount(() => {
getUser(); getUser();
}); });
setInterval(() => {
getUser();
},15000)
let isProfileOpen = false; let isProfileOpen = false;
function clickProfile() { function clickProfile() {

6
front/volume/src/Auth.ts

@ -20,10 +20,8 @@ export async function getUser() {
referrerPolicy: "no-referrer", referrerPolicy: "no-referrer",
}); });
let user = await res.json(); let user = await res.json();
if (user.username) { if (user.username) store.set(user);
console.log(user); else store.set(null);
store.set(user);
}
} }
export function login() { export function login() {

Loading…
Cancel
Save