import { useState, useEffect } from 'react' import { Link, useNavigate } from 'react-router-dom' import { AlertTriangle } from 'lucide-react' import { aiSessionsApi } from '@/api/aiSessions' import type { AISessionSummary } from '@/types/ai-session' import { timeAgo } from '@/lib/timeAgo' export function PendingEscalations() { const [escalations, setEscalations] = useState([]) const navigate = useNavigate() useEffect(() => { aiSessionsApi.getEscalationQueue() .then(setEscalations) .catch(() => {}) }, []) if (escalations.length === 0) return null return (

Pending Escalations {escalations.length}

View all
{escalations.slice(0, 3).map((esc, i) => (
{esc.problem_summary || 'Escalated session'}
{esc.problem_domain || 'General'} · {timeAgo(esc.created_at)}
))}
) }