diff --git a/client/src/components/Header.vue b/client/src/components/Header.vue index a583c68..a5b6f26 100644 --- a/client/src/components/Header.vue +++ b/client/src/components/Header.vue @@ -2,7 +2,7 @@ import ThemeToggle from './ThemeToggle.vue' const props = defineProps(['modelValue']) -defineEmits(['update:modelValue']) +const emit = defineEmits(['update:modelValue']) async function signout(ev) { ev.preventDefault() @@ -16,6 +16,7 @@ async function signout(ev) { } let resp = await fetch(api_url, fetch_options) console.log(resp) + emit('update:modelValue', '') window.location.reload() } diff --git a/client/src/components/Login.vue b/client/src/components/Login.vue index 1f117f6..17cbc23 100644 --- a/client/src/components/Login.vue +++ b/client/src/components/Login.vue @@ -22,7 +22,7 @@ async function login(ev) { let resp = await fetch(api_url, fetch_options) if (resp.ok) { - emit('update:modelValue', user.value) + emit('update:modelValue', await resp.json()) window.location.hash = "/" } else { user.value = ''