import { X, Ruler, Activity } from 'lucide-react'; import type { CelestialBody } from '../types'; interface FocusInfoProps { body: CelestialBody | null; onClose: () => void; } export function FocusInfo({ body, onClose }: FocusInfoProps) { if (!body) return null; // Calculate distance if position is available const pos = body.positions[0]; const distance = pos ? Math.sqrt(pos.x ** 2 + pos.y ** 2 + pos.z ** 2).toFixed(2) : '---'; const isProbe = body.type === 'probe'; const isActive = body.is_active !== false; return ( // Remove fixed positioning, now handled by parent container (Html component in 3D)
{body.description || '暂无描述'}