import { useContext } from "react"; import Button from "@moduletrace/twui/layout/Button"; import { Monitor } from "lucide-react"; import { BotComputersContext } from "../(data)/bot-computers-context"; import Span from "@moduletrace/twui/layout/Span"; /** * Beside the composer's tools: opens the computer the bot is on in the * viewer. Nothing when it has none. */ export default function ComposerComputerButton() { const { computers, openComputer } = useContext(BotComputersContext); const computer = computers[0]; if (!computer?.id) return null; const title = `Open ${computer.name || `computer ${computer.id}`}`; return ( ); }