import React from 'react' import { Brain, RefreshCw } from 'lucide-react' const formatTime = (isoStr?: string) => { if (!isoStr) return null const d = new Date(isoStr) return d.toLocaleTimeString('ko-KR', { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false, timeZone: 'Asia/Seoul' }) } interface RecommendationPanelProps { recommendations: any | undefined isError: boolean onRefetch: () => void selectedStock: string onSelectStock: (code: string) => void onRefetchAiAnalysis: () => void heldStockCodes: Set pendingBuyStockCodes: Set livePrices: Record | undefined } const RecommendationPanel = React.memo(({ recommendations, isError, onRefetch, selectedStock, onSelectStock, onRefetchAiAnalysis, heldStockCodes, pendingBuyStockCodes, livePrices, }: RecommendationPanelProps) => { return (

분석 종목

{recommendations?.batch_time && ( {formatTime(recommendations.batch_time)} )} {recommendations?.analyzed_stocks || 0}
{isError ? (

⚠️ API 오류

백엔드 로그 확인 필요

) : recommendations === undefined ? (

분석 종목 로딩 중...

최초 로딩 시 10초 정도 소요됩니다

) : (recommendations?.analyzed_stock_list || []).length > 0 ? ( (recommendations.analyzed_stock_list as any[]).map((stock: any, idx: number) => { const isRecommended = (recommendations?.recommendations || []).some((r: any) => r.stock_code === stock.stock_code) const isHeld = heldStockCodes.has(stock.stock_code) const isPending = pendingBuyStockCodes.has(stock.stock_code) const changeRate = stock.change_rate || 0 return ( ) }) ) : (

배치 분석 데이터가 없습니다.

make batch-test 실행 필요

)}
) }) RecommendationPanel.displayName = 'RecommendationPanel' export default RecommendationPanel