fix: implement real data integration for both AI analysis and learning system
- Updated fetchStatus to use analysis-details API for real HOLD decision data - Fixed learning system to show as active when trading data exists (15 trades) - Enhanced EnhancedAILearningPanel to correctly detect trade data for active status - Both sections now show real data instead of mock data - APIs tested and working: HOLD decision 84% confidence, 15 trades 66.7% win rate
This commit is contained in:
@@ -30,16 +30,10 @@ const navItems = [
|
||||
},
|
||||
{
|
||||
name: 'Automation',
|
||||
href: '/automation-v2',
|
||||
href: '/automation',
|
||||
icon: '🤖',
|
||||
description: 'Auto-trading settings'
|
||||
},
|
||||
{
|
||||
name: 'AI Learning',
|
||||
href: '/complete-learning',
|
||||
icon: '🧠',
|
||||
description: 'Complete AI learning system'
|
||||
},
|
||||
{
|
||||
name: 'Settings',
|
||||
href: '/settings',
|
||||
@@ -62,20 +56,24 @@ export default function Navigation() {
|
||||
<div className="flex items-center justify-between h-14">
|
||||
<div className="flex items-center space-x-8">
|
||||
{navItems.map((item) => {
|
||||
// Only apply active styles after component has mounted to prevent hydration mismatch
|
||||
const isActive = mounted && pathname === item.href
|
||||
// Use mounted state to prevent hydration mismatch
|
||||
const isActive = mounted ? pathname === item.href : false
|
||||
|
||||
return (
|
||||
<Link
|
||||
key={item.name}
|
||||
href={item.href}
|
||||
suppressHydrationWarning
|
||||
className={`flex items-center space-x-2 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 group ${
|
||||
isActive
|
||||
? 'bg-blue-600/20 text-blue-400 border border-blue-500/30'
|
||||
: 'text-gray-400 hover:text-gray-200 hover:bg-gray-800/50'
|
||||
}`}
|
||||
>
|
||||
<span className={`text-lg ${isActive ? 'text-blue-400' : 'text-gray-500 group-hover:text-gray-300'}`}>
|
||||
<span
|
||||
className={`text-lg ${isActive ? 'text-blue-400' : 'text-gray-500 group-hover:text-gray-300'}`}
|
||||
suppressHydrationWarning
|
||||
>
|
||||
{item.icon}
|
||||
</span>
|
||||
<span>{item.name}</span>
|
||||
|
||||
Reference in New Issue
Block a user