15 lines
320 B
TypeScript
15 lines
320 B
TypeScript
import { createGlobalState, useLocalStorage } from '@vueuse/core'
|
|
|
|
export const usePreferences = createGlobalState(() => {
|
|
const username = useLocalStorage<string>('username', '')
|
|
|
|
const audioDevice = shallowRef()
|
|
const videoDevice = shallowRef()
|
|
|
|
return {
|
|
username,
|
|
audioDevice,
|
|
videoDevice,
|
|
}
|
|
})
|