import { useEffect, useState } from 'react' import LiveMarketPanel from './components/LiveMarketPanel' import MultiChartSSEPanel from './components/MultiChartSSEPanel' import AccountPositionsPanel from './components/AccountPositionsPanel' import EquityPerformancePanel from './components/EquityPerformancePanel' import DecisionLogPanel from './components/DecisionLogPanel' import SettingsPanel from './components/SettingsPanel' import PromptTemplatesPanel from './components/PromptTemplatesPanel' import { statusApi } from './services/api' // Phase 1: Daily Helper Components import NotificationCenter from './components/NotificationCenter' import UserProfileSetup from './components/UserProfileSetup' import HabitTracker from './components/HabitTracker' import DailyChecklistPanel from './components/DailyChecklistPanel' // Phase 3: Advanced Analytics Components import AnalyticsDashboard from './components/AnalyticsDashboard' // Phase 4: Economic Calendar & Advanced Features import EconomicCalendar from './components/EconomicCalendar' import AdvancedIndicatorsPanel from './components/AdvancedIndicatorsPanel' function Tabs({ tabs, active, onChange }: { tabs: string[]; active: string; onChange: (t: string) => void }) { return (
{tabs.map(t => ( ))}
) } export default function App() { const [activeTab, setActiveTab] = useState<'Live' | 'Account' | 'Equity' | 'Decisions' | 'Analytics' | 'Economic Calendar' | 'Indicators' | 'Settings' | 'Prompts' | 'Daily Helper'>('Live') const [backendStatus, setBackendStatus] = useState(null) const [showProfileSetup, setShowProfileSetup] = useState(false) useEffect(() => { let mounted = true ;(async () => { try { const s = await statusApi.getStatus() if (mounted) setBackendStatus(s) } catch (e) { // ignore } })() return () => { mounted = false } }, []) const tabs = ['Live', 'Account', 'Equity', 'Decisions', 'Analytics', 'Economic Calendar', 'Indicators', 'Daily Helper', 'Settings', 'Prompts'] return (

Assistant Market Simulator

AI-Powered Trading with Daily Helper

{backendStatus ? ( API: {backendStatus.app?.name} v{backendStatus.app?.version} ) : ( Checking API… )}
setActiveTab(t as any)} /> {activeTab === 'Live' && (
)} {activeTab === 'Account' && } {activeTab === 'Equity' && } {activeTab === 'Decisions' && } {activeTab === 'Analytics' && } {activeTab === 'Economic Calendar' && } {activeTab === 'Indicators' && } {activeTab === 'Daily Helper' && (
)} {showProfileSetup && ( setShowProfileSetup(false)} onSaved={() => { // Profile saved successfully }} /> )} {activeTab === 'Settings' && } {activeTab === 'Prompts' && }
) }