### Page Preview using Framer Publish Info Source: https://www.framer.com/developers/site/index This example demonstrates how to use the `usePublishInfo` hook to get the current page's staging URL and render it within an iframe. It includes a conditional check to ensure the site has been published before attempting to display the preview. ```typescript import { useState, useEffect } from "react"; import { framer, PublishInfo } from "@framer/core"; function usePublishInfo() { const [publishInfo, setPublishInfo] = useState(); useEffect(() => { return framer.subscribeToPublishInfo(setPublishInfo); }, []); return publishInfo; } function PagePreview() { const publishInfo = usePublishInfo(); const stagingUrl = publishInfo?.staging?.currentPageUrl; if (!stagingUrl) return "Publish your Site"; return (