'use client'; import { Button } from '@vercel/geistdocs/components/button'; import { CheckIcon, CopyIcon } from 'lucide-react'; import { useState } from 'react'; function CopyButton({ text }: { text: string }) { const [copied, setCopied] = useState(false); const handleCopy = () => { navigator.clipboard.writeText(text).then(() => { setCopied(true); setTimeout(() => setCopied(false), 2000); }); }; return ( ); } export function PreviewInstall({ deploymentUrl }: { deploymentUrl: string }) { const baseUrl = deploymentUrl.replace(/\/$/, ''); const installCmd = `pnpm i ${baseUrl}/workflow.tgz`; const npxCmd = `npx workflow@${baseUrl}/workflow.tgz web`; return (
Install the workflow package from this preview:
{installCmd}
Run the web UI in your project:
{npxCmd}