feat(SW-508): preview for content pages
This commit is contained in:
14
components/LivePreview/index.tsx
Normal file
14
components/LivePreview/index.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
"use client"
|
||||
|
||||
import { ContentstackLivePreview } from "@contentstack/live-preview-utils"
|
||||
import { useEffect } from "react"
|
||||
|
||||
export default function InitLivePreview() {
|
||||
useEffect(() => {
|
||||
if (!ContentstackLivePreview.livePreview) {
|
||||
ContentstackLivePreview.init()
|
||||
}
|
||||
}, [])
|
||||
|
||||
return null
|
||||
}
|
||||
Reference in New Issue
Block a user