From fed39b18be163117e5546fee7f06e69225f8662f Mon Sep 17 00:00:00 2001 From: Christian Vidal Wolf Date: Fri, 20 Feb 2026 11:12:30 +0100 Subject: [PATCH] fix: show all marketplaces (incl. Amazon UK) in experiment form Use a hardcoded ALL_MARKETPLACES list instead of deriving from current filtered data, so Amazon UK is always available even when viewing PAN-EU. Co-Authored-By: Claude Opus 4.6 --- components/ExperimentTracker.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/components/ExperimentTracker.tsx b/components/ExperimentTracker.tsx index 9ca083d..fc62f3b 100644 --- a/components/ExperimentTracker.tsx +++ b/components/ExperimentTracker.tsx @@ -61,6 +61,8 @@ const STATUS_LABELS: Record = { 'failed': 'Failed', }; +const ALL_MARKETPLACES = ['Amazon DE', 'Amazon IT', 'Amazon FR', 'Amazon ES', 'Amazon UK']; + const STORAGE_KEY = 'craze_experiments'; // --- Storage helpers --- @@ -179,18 +181,12 @@ const ExperimentTracker: React.FC = ({ rows, weeks, prim const [formDesc, setFormDesc] = useState(''); const [formImpact, setFormImpact] = useState('More Sales'); - // Available marketplaces from data - const marketplaces = useMemo(() => { - const mks = new Set(rows.map(r => r.customer).filter(Boolean)); - return Array.from(mks).sort(); - }, [rows]); - // Default marketplace to active filter when opening form const defaultMarketplace = useMemo(() => { if (customerFilters.length === 1) return customerFilters[0]; if (customerFilters.length > 0) return customerFilters[0]; - return marketplaces[0] || ''; - }, [customerFilters, marketplaces]); + return ALL_MARKETPLACES[0]; + }, [customerFilters]); // Available product lines from data const productLines = useMemo(() => { @@ -445,7 +441,7 @@ const ExperimentTracker: React.FC = ({ rows, weeks, prim className="w-full bg-slate-950 border border-white/10 rounded-lg px-3 py-2 text-sm text-white focus:outline-none focus:ring-2 focus:ring-indigo-500" > - {marketplaces.map(mk => ( + {ALL_MARKETPLACES.map(mk => ( ))}