"use client"; import { ChevronLeft, ChevronRight, Globe, Link, RotateCw, TerminalSquare, UnfoldVertical, } from "lucide-react"; import { useRef } from "react"; import { toast } from "sonner"; export default function PreviewWindow({ collapsed, open, sandboxId, }: { collapsed: boolean; open: () => void; sandboxId: string; }) { const ref = useRef(null); return ( <>
Preview localhost:3000
{collapsed ? ( ) : ( <> {/* Todo, make this open inspector */} {}}> { navigator.clipboard.writeText( `http://${sandboxId}.sandbox.ishaand.com` ); toast.info("Copied preview link to clipboard"); }} > { if (ref.current) { ref.current.contentWindow?.location.reload(); } }} > )}
{collapsed ? null : (