From 2aaec76a1b2ae1b700e470377d5faf3845638c49 Mon Sep 17 00:00:00 2001 From: Rafael Agostini Date: Thu, 16 Jan 2025 15:41:49 -0500 Subject: [PATCH] Update locations map to render fake data --- .../features/modules/stats-locations/stats-locations.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/my-sites/stats/features/modules/stats-locations/stats-locations.tsx b/client/my-sites/stats/features/modules/stats-locations/stats-locations.tsx index 6e6bfacdff800..bd100ea100b7f 100644 --- a/client/my-sites/stats/features/modules/stats-locations/stats-locations.tsx +++ b/client/my-sites/stats/features/modules/stats-locations/stats-locations.tsx @@ -156,6 +156,8 @@ const StatsLocations: React.FC< StatsModuleLocationsProps > = ( { query, summary ]; const hasLocationData = Array.isArray( data ) && data.length > 0; + const locationData = shouldGate ? fakeData : data; + return ( <> { ! shouldGateStatsModule && siteId && statType && ( @@ -188,12 +190,12 @@ const StatsLocations: React.FC< StatsModuleLocationsProps > = ( { query, summary } moduleType="countryviews" - data={ shouldGate ? fakeData : data } + data={ locationData } emptyMessage={ emptyMessage } metricLabel={ translate( 'Views' ) } loader={ isRequestingData && } splitHeader - heroElement={ } + heroElement={ } mainItemLabel={ optionLabels[ selectedOption ]?.headerLabel } toggleControl={ toggleControlComponent } showMore={ @@ -201,7 +203,7 @@ const StatsLocations: React.FC< StatsModuleLocationsProps > = ( { query, summary ? { url: summaryUrl, label: - Array.isArray( data ) && data.length >= 10 + Array.isArray( locationData ) && locationData.length >= 10 ? translate( 'View all', { context: 'Stats: Button link to show more detailed stats information', } )