Add extensive debugging to analysis and gallery components
- Add console logging to track result data in AIAnalysisPanel - Add debugging to ScreenshotGallery rendering conditions - Track screenshot data flow and component render states - Help identify why gallery preview/enlargement not working
This commit is contained in:
@@ -475,6 +475,7 @@ export default function AIAnalysisPanel() {
|
||||
|
||||
return (
|
||||
<div className="card card-gradient">
|
||||
{console.log('AIAnalysisPanel render - result:', result)}
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<h2 className="text-xl font-bold text-white flex items-center">
|
||||
<span className="w-8 h-8 bg-gradient-to-br from-cyan-400 to-blue-600 rounded-lg flex items-center justify-center mr-3">
|
||||
@@ -1370,14 +1371,23 @@ export default function AIAnalysisPanel() {
|
||||
|
||||
{/* Screenshot Gallery */}
|
||||
{result && result.screenshots && (
|
||||
<ScreenshotGallery
|
||||
screenshots={result.screenshots}
|
||||
symbol={symbol}
|
||||
timeframes={selectedTimeframes.map(tf => timeframes.find(t => t.value === tf)?.label || tf)}
|
||||
enlargedImage={enlargedScreenshot}
|
||||
onImageClick={handleScreenshotClick}
|
||||
onClose={() => setEnlargedScreenshot(null)}
|
||||
/>
|
||||
<>
|
||||
{console.log('Rendering ScreenshotGallery with:', {
|
||||
screenshots: result.screenshots,
|
||||
screenshotsLength: result.screenshots.length,
|
||||
symbol,
|
||||
selectedTimeframes,
|
||||
enlargedScreenshot
|
||||
})}
|
||||
<ScreenshotGallery
|
||||
screenshots={result.screenshots}
|
||||
symbol={symbol}
|
||||
timeframes={selectedTimeframes.map(tf => timeframes.find(t => t.value === tf)?.label || tf)}
|
||||
enlargedImage={enlargedScreenshot}
|
||||
onImageClick={handleScreenshotClick}
|
||||
onClose={() => setEnlargedScreenshot(null)}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* Multi-timeframe Screenshot Gallery */}
|
||||
|
||||
Reference in New Issue
Block a user