diff --git a/front/volume/src/App.svelte b/front/volume/src/App.svelte index 0ebb2b6..592b0cd 100644 --- a/front/volume/src/App.svelte +++ b/front/volume/src/App.svelte @@ -20,6 +20,9 @@ onMount(() => { getUser(); }); + setInterval(() => { + getUser(); + },15000) let isProfileOpen = false; function clickProfile() { diff --git a/front/volume/src/Auth.ts b/front/volume/src/Auth.ts index 9575fa4..69af3d0 100644 --- a/front/volume/src/Auth.ts +++ b/front/volume/src/Auth.ts @@ -20,10 +20,8 @@ export async function getUser() { referrerPolicy: "no-referrer", }); let user = await res.json(); - if (user.username) { - console.log(user); - store.set(user); - } + if (user.username) store.set(user); + else store.set(null); } export function login() {