import { useEffect, useState } from 'react'; const API_BASE = import.meta.env.VITE_API_URL?.replace(/\/$/, '') ?? ''; interface NavbarProps { onDashboard: () => void; onGetStarted: () => void; onOpenModal: (modal: string) => void; } export default function Navbar({ onDashboard, onGetStarted, onOpenModal }: NavbarProps) { const [health, setHealth] = useState<'checking' | 'online' | 'offline'>('checking'); useEffect(() => { fetch(`${API_BASE}/health`) .then(r => r.ok ? setHealth('online') : setHealth('offline')) .catch(() => setHealth('offline')); }, []); const dotColor = health === 'online' ? '#a855f7' : health === 'offline' ? '#f43f5e' : '#6b7280'; const dotGlow = health === 'online' ? '0 0 8px #a855f7' : health === 'offline' ? '0 0 8px #f43f5e' : 'none'; return ( ); }