RuralDatabase/apps/web/composables/stores/resource.ts

25 lines
453 B
TypeScript

import type { UserInfo } from '~/api/user'
export const useResourceStore = defineStore('user', {
state: (): {
search:string
searchThrottled:Ref<string>
} => ({
search:'',
searchThrottled:refThrottled(ref(''),300)
}),
actions: {
},
persist: {
storage: persistedState.sessionStorage
}
})
// @ts-ignore
if (import.meta.hot)
// @ts-ignore
import.meta.hot.accept(acceptHMRUpdate(useResourceStore, import.meta.hot))