mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-14 04:49:59 +00:00
13 lines
486 B
TypeScript
13 lines
486 B
TypeScript
|
import type { ActiveHeadEntry, HeadEntryOptions, UseHeadInput } from '@vueuse/head'
|
||
|
import type { HeadAugmentations } from '@nuxt/schema'
|
||
|
import { useHead as _useHead } from '#head'
|
||
|
|
||
|
export function useHead<T extends HeadAugmentations>(input: UseHeadInput<T>, options?: HeadEntryOptions): ActiveHeadEntry<UseHeadInput<T>> | void {
|
||
|
const deactivated = useDeactivated()
|
||
|
return _useHead(() => {
|
||
|
if (deactivated.value)
|
||
|
return {}
|
||
|
return resolveUnref(input)
|
||
|
}, options)
|
||
|
}
|