From 7521f798f69454f887a83695fbdc7b3b5f487c8f Mon Sep 17 00:00:00 2001 From: ht Date: Fri, 28 Aug 2026 08:17:00 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20Rakip=20Radar=20widget'=C4=B1n=C4=B1=20g?= =?UTF-8?q?er=C3=A7ek=20firmStats'a=20ba=C4=9Fla=20(son=20mock=20kald?= =?UTF-8?q?=C4=B1r=C4=B1ld=C4=B1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RightSidebar teaser widget COMPETITOR_DATA mock yerine canlı firmStats(tenders) kullanıyor; veri yokken dürüst boş durum gösteriyor. --- src/components/RightSidebar.jsx | 36 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/components/RightSidebar.jsx b/src/components/RightSidebar.jsx index b1d4363..f63b0b4 100644 --- a/src/components/RightSidebar.jsx +++ b/src/components/RightSidebar.jsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import { useApp } from '../context/AppContext'; -import { MOCK_COMPANY_STATS, COMPETITOR_DATA } from '../data/mockTenders'; +import { MOCK_COMPANY_STATS } from '../data/mockTenders'; +import { firmStats } from '../services/analytics'; import { Briefcase, FileText, Calendar, History, Trophy, Eye, Kanban, Radar, ArrowRight, Users, Plus, Trash2 } from 'lucide-react'; export const RightSidebar = () => { @@ -10,6 +11,7 @@ export const RightSidebar = () => { const [tmRole, setTmRole] = useState('Uzman'); const trackedCount = tenders.filter(t => t.takipte).length; + const topFirms = firmStats(tenders).firms.slice(0, 3); const handleAddMember = (e) => { e.preventDefault(); @@ -91,20 +93,26 @@ export const RightSidebar = () => {
- {COMPETITOR_DATA.slice(0, 3).map((comp, i) => ( -
-
- {comp.name} - %{comp.share} ({comp.winCount} İhale) + {topFirms.length === 0 ? ( +

+ Kazanan firma verisi biriktikçe (doğrudan temin & sonuç ilanları) gerçek pazar payları burada listelenir. +

+ ) : ( + topFirms.map((comp, i) => ( +
+
+ {comp.name} + %{comp.share} ({comp.wins} İhale) +
+
+
+
-
-
-
-
- ))} + )) + )}