From 235928a588b21af8bcd150529cacfe142ad0bee6 Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Thu, 22 Jan 2026 15:01:41 +0100 Subject: [PATCH] fix: restore Top 50 button visibility in Weekly Sales tab - WeeklyGrid.tsx: Corrected visibility condition for top50Ranking object structure - WeeklyGrid.tsx: Verified and improved Top 50 filtering and sorting logic --- components/WeeklyGrid.tsx | 50 +++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/components/WeeklyGrid.tsx b/components/WeeklyGrid.tsx index 3db2b6e..a252fb8 100644 --- a/components/WeeklyGrid.tsx +++ b/components/WeeklyGrid.tsx @@ -287,29 +287,33 @@ const WeeklyGrid: React.FC = ({ data, top50Ranking, onDrillDown {/* Top 50 Filter Toggle */} - {top50Ranking && top50Ranking.size > 0 && ( - - )} + {top50Ranking && ( + (top50Ranking.overall?.size || 0) > 0 || + (top50Ranking.eu?.size || 0) > 0 || + (top50Ranking.uk?.size || 0) > 0 + ) && ( + + )} {/* Export Button */}