import React from 'react'; import { AppProvider, useApp } from './context/AppContext'; import { KotaUyarisi } from './components/KotaUyarisi'; import { Header } from './components/Header'; import { LiveStatsBar } from './components/LiveStatsBar'; import { TopNavigation } from './components/TopNavigation'; import { SummaryCards } from './components/SummaryCards'; import { LeftSidebar } from './components/LeftSidebar'; import { TenderList } from './components/TenderList'; import { RightSidebar } from './components/RightSidebar'; import { DetailedSearchModal } from './components/DetailedSearchModal'; import { TenderDetailModal } from './components/TenderDetailModal'; import { CompanyScannerModal } from './components/CompanyScannerModal'; import { AiSpecAnalyzerModal } from './components/AiSpecAnalyzerModal'; import { UrunAramaModal } from './components/UrunAramaModal'; import { KullanimKilavuzu } from './components/KullanimKilavuzu'; import { MobilFiltreCekmecesi } from './components/MobilFiltreCekmecesi'; import { LoginPage } from './components/LoginPage'; import { LandingPage } from './components/LandingPage'; import { DeferredView } from './components/DeferredView'; const toolViews = { smart_filter_builder: () => import('./components/SmartFilterBuilder').then(module => ({ default: module.SmartFilterBuilder })), bulten: () => import('./components/tools/DailyBulletin').then(module => ({ default: module.DailyBulletin })), sonuc: () => import('./components/tools/ResultSearch').then(module => ({ default: module.ResultSearch })), takvim: () => import('./components/tools/TenderCalendar').then(module => ({ default: module.TenderCalendar })), sozlesme: () => import('./components/tools/ContractSearch').then(module => ({ default: module.ContractSearch })), kdv: () => import('./components/tools/VatCalculator').then(module => ({ default: module.VatCalculator })), sinir: () => import('./components/tools/SinirDeger').then(module => ({ default: module.SinirDeger })), fiyat: () => import('./components/tools/PriceAnalysis').then(module => ({ default: module.PriceAnalysis })), kanban: () => import('./components/KanbanBoard').then(module => ({ default: module.KanbanBoard })), rakip_radar: () => import('./components/tools/CompetitorRadar').then(module => ({ default: module.CompetitorRadar })), dokuman_deposu: () => import('./components/tools/DocumentVault').then(module => ({ default: module.DocumentVault })), analitik_dashboard: () => import('./components/tools/AnalyticsDashboard').then(module => ({ default: module.AnalyticsDashboard })), kirmizi_bayrak: () => import('./components/tools/RedFlags').then(module => ({ default: module.RedFlags })), ted_eu: () => import('./components/tools/TedTenders').then(module => ({ default: module.TedTenders })), kik_kararlari: () => import('./components/tools/KikDecisions').then(module => ({ default: module.KikDecisions })), planlar: () => import('./components/tools/Pricing').then(module => ({ default: module.Pricing })), api_webhooks: () => import('./components/tools/ApiWebhooks').then(module => ({ default: module.ApiWebhooks })), pwa_settings: () => import('./components/tools/PwaSettings').then(module => ({ default: module.PwaSettings })), ai_ayarlari: () => import('./components/tools/AiModelSettings').then(module => ({ default: module.AiModelSettings })), }; const MainContent = () => { const { activeTab, isAdmin, saveError, savingCount } = useApp(); return (
{/* 3-Column Main View */} {savingCount > 0 &&

Kaydediliyor…

} {saveError &&

{saveError} Değişiklik kaydedilmedi; tekrar deneyin.

} {activeTab === 'list' && ( <>
{/* Masaüstünde sabit panel; mobilde çekmece (yukarıda) */}
{/* Sağ panel küçük ekranda listeyi uzatıyordu */}
)} {toolViews[activeTab] && (activeTab !== 'ai_ayarlari' || isAdmin) && } {/* Global Modals */}
); }; const Gate = () => { const { authReady, isAuthenticated, handleLogin } = useApp(); const [showLogin, setShowLogin] = React.useState(() => window.location.hash === '#giris'); React.useEffect(() => { const onHash = () => setShowLogin(window.location.hash === '#giris'); window.addEventListener('hashchange', onHash); return () => window.removeEventListener('hashchange', onHash); }, []); if (!authReady) { return (
Yükleniyor…
); } if (!isAuthenticated) { if (!showLogin) { return { window.location.hash = '#giris'; setShowLogin(true); }} />; } return ; } return (
); }; export default function App() { return ( ); }