mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-05 16:39:58 +00:00
pref: improve current user handle writting
This commit is contained in:
parent
55a58f5509
commit
680b3493b3
1 changed files with 4 additions and 1 deletions
|
@ -92,7 +92,10 @@ if (process.client) {
|
|||
}, { immediate: true, flush: 'post' })
|
||||
|
||||
// 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
|
||||
|
|
Loading…
Reference in a new issue