import { Link } from 'react-router-dom' import { useSession } from '@/store/session' import { cn } from '@/lib/utils' export interface OpenYourNodeProps { /** 'hero' is the big primary CTA used on the setup page; 'inline' is a compact * link for reuse inside later module pages. */ variant?: 'hero' | 'inline' className?: string } /** * Reusable "Open your node" call-to-action. Opens the board's LAN ZeroClaw * dashboard (device.nodeUrl) in a new tab. When the board isn't claimed yet it * shows an amber prompt back to team registration instead. */ export function OpenYourNode({ variant = 'hero', className }: OpenYourNodeProps) { const device = useSession((s) => s.device) const canOpen = device.connected && !!device.nodeUrl if (!canOpen) { return (
No node yet โ€” claim your board first.
) } if (variant === 'inline') { return ( Open your node โ†’ ) } return (
Open your node โ†’ Connected
{device.port ? `${device.port} ยท ` : ''}{device.nodeUrl}
) }