import React, { useEffect, useState } from 'react'; import { useTranscriptionStore } from '../stores/transcriptionStore'; import { CheckCircleIcon, ClockIcon, InformationCircleIcon } from '@heroicons/react/24/outline'; const ServerStatusIndicator: React.FC = () => { const { serverStatus, serverHealth, startStatusPolling, stopStatusPolling, fetchServerHealth } = useTranscriptionStore(); const [showTooltip, setShowTooltip] = useState(false); // Start polling when component mounts useEffect(() => { startStatusPolling(); // Also fetch server health initially fetchServerHealth(); // Cleanup on unmount return () => { stopStatusPolling(); }; }, [startStatusPolling, stopStatusPolling, fetchServerHealth]); if (!serverStatus) { return (