Closed notflip closed 1 day ago
Yes, you should be able to use the useSanityVisualEditingState()
composable.
This returns an object with the following signature:
{
enabled: boolean;
inFrame: boolean | undefined;
}
inFrame
is true if the app is being rendered in a Presentation tool context (i.e. in an iframe). It will always be undefined
on the server.
Perfect, Thanks!
I would like to be able to see if we're in preview mode, to conditionally not render things, is this possible? Thanks