chore(vue): add useCookie stub

This commit is contained in:
Benjamin Canac
2025-02-26 21:40:22 +01:00
parent dfda53fa20
commit 955000285b

View File

@@ -9,6 +9,22 @@ export { useRoute, useRouter } from 'vue-router'
export const useAppConfig = () => appConfig
export const useCookie = <T = string>(
_name: string,
_options: Record<string, any> = {}
) => {
const value = ref(null) as Ref<T>
return {
value,
get: () => value.value,
set: () => {},
update: () => {},
refresh: () => Promise.resolve(value.value),
remove: () => {}
}
}
const state: Record<string, any> = {}
export const useState = <T>(key: string, init: () => T): Ref<T> => {