@nuxtjs/sanity
Version:
Sanity integration for Nuxt
12 lines (11 loc) • 586 B
TypeScript
import { type Ref } from 'vue';
/**
* Detects if the application is considered to be in a "Live Preview" mode. Live
* Preview means that the application is either being viewed inside Sanity
* Presentation Tool or being previewed in a standalone context. Useful for
* conditionally rendering UI that should only be visible to content editors.
* The composable returns `null` initially, to signal it doesn't yet know if
* it's live previewing or not. Then `true` if it is, and `false` otherwise.
* @public
*/
export declare function useIsSanityLivePreview(): Ref<boolean | null>;