자산API DB캐쉬 사용

This commit is contained in:
2026-02-24 17:36:24 +09:00
parent d2b4b398e5
commit 8c9b4abc72
6 changed files with 116 additions and 45 deletions

View File

@@ -56,7 +56,13 @@ const PortfolioPanel = React.memo(({
className={`w-full p-3 hover:bg-gray-700/30 transition-all duration-200 group ${selectedStock === stock.stock_code ? 'bg-blue-500/10 border-l-2 border-blue-500' : 'border-l-2 border-transparent'}`}
>
<div
onClick={() => { onSelectStock(stock.stock_code); onRefetchAiAnalysis() }}
onClick={() => {
if (selectedStock === stock.stock_code) {
onRefetchAiAnalysis() // 같은 종목 재클릭 → 강제 새로고침
} else {
onSelectStock(stock.stock_code) // 새 종목 → queryKey 변경으로 자동 fetch
}
}}
className="cursor-pointer"
>
<div className="flex justify-between items-start mb-1">