"use client"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { useTerminal } from "@/context/TerminalContext"; import { Play, Pause, Globe, Globe2 } from "lucide-react"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; import { Sandbox, User } from "@/lib/types"; export default function DeployButtonModal({ userData, data, }: { userData: User; data: Sandbox; }) { const { deploy } = useTerminal(); const [isDeploying, setIsDeploying] = useState(false); const handleDeploy = () => { if (isDeploying) { console.log("Stopping deployment..."); setIsDeploying(false); } else { console.log("Starting deployment..."); setIsDeploying(true); deploy(() => { setIsDeploying(false); }); } }; return ( <>

Domains

} domain={`${data.id}.gitwit.app`} timestamp="Deployed 1h ago" user={userData.name} />
); } function DeploymentOption({ icon, domain, timestamp, user }: { icon: React.ReactNode; domain: string; timestamp: string; user: string }) { return (
{icon}
{domain}

{timestamp} • {user}

); }