'use client' import { RefreshCw, AlertTriangle } from 'lucide-react' import { NetworkError } from '@/lib/errors' interface ErrorStateProps { error: unknown onRetry?: () => void } export function ErrorState({ error }: ErrorStateProps) { const isNetwork = error instanceof NetworkError const title = isNetwork ? 'Server Connection Lost' : 'Error' const message = isNetwork ? 'Unable to connect to the bundle analyzer server. Please ensure the server is running and try again.' : ((error as any)?.message ?? 'An unexpected error occurred.') return (
{message}