pref: improve current user handle writting
parent
55a58f5509
commit
680b3493b3
|
@ -92,7 +92,10 @@ if (process.client) {
|
||||||
}, { immediate: true, flush: 'post' })
|
}, { immediate: true, flush: 'post' })
|
||||||
|
|
||||||
// for injected script to read
|
// for injected script to read
|
||||||
useLocalStorage<string>(STORAGE_KEY_CURRENT_USER_HANDLE, computed(() => currentUser.value?.account.acct || ''))
|
const currentUserHandle = computed(() => currentUser.value?.account.acct || '')
|
||||||
|
watchEffect(() => {
|
||||||
|
localStorage.setItem(STORAGE_KEY_CURRENT_USER_HANDLE, currentUserHandle.value)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useUsers = () => users
|
export const useUsers = () => users
|
||||||
|
|
Loading…
Reference in New Issue