import type { ReactNode } from 'react'; const T = { surface: 'rgba(255,255,255,0.025)', border: 'rgba(255,255,255,0.08)', text: '#f5f5f5', dim: '#8a8a8a', muted: '#5e5e5e', accent: '#c9b787', }; interface RefreshBarProps { loading: boolean; error: string | null; lastUpdated: string | null; onRefresh: () => void; } export function RefreshBar({ loading, error, lastUpdated, onRefresh }: RefreshBarProps) { return (
{error ? ( ERROR — {error} ) : lastUpdated ? ( Updated {new Date(lastUpdated).toLocaleTimeString()} ) : null}
); } interface LoadingStateProps { label?: string; } export function LoadingState({ label = 'Loading defense data…' }: LoadingStateProps) { return (
{label}
); } interface ErrorStateProps { error: string; onRetry: () => void; children?: ReactNode; } export function ErrorState({ error, onRetry, children }: ErrorStateProps) { return (
DEFENSE FEED UNAVAILABLE
{error}
{children}
); }