From f04b32d3dfd1ad70be457c6aa30ef882568089d0 Mon Sep 17 00:00:00 2001 From: Surmon Date: Sat, 17 Aug 2024 20:02:05 +0800 Subject: [PATCH] fix(dashboard): unknow country code --- .../Dashboard/GoogleAnalytics/Realtime.tsx | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/pages/Dashboard/GoogleAnalytics/Realtime.tsx b/src/pages/Dashboard/GoogleAnalytics/Realtime.tsx index 589e57c..332ab31 100644 --- a/src/pages/Dashboard/GoogleAnalytics/Realtime.tsx +++ b/src/pages/Dashboard/GoogleAnalytics/Realtime.tsx @@ -86,7 +86,7 @@ export const GoogleAnalyticsRealtime: React.FC = ( window.clearTimeout(intervalId.current) }) - const renderList = (dataSource: ReportRowItem[]) => ( + const renderRegionList = (dataSource: ReportRowItem[]) => ( = ( renderItem={(item, index) => ( - - } - /> + {item.dimensionValues[0].value.includes('other') ? ( + + } + /> + ) : ( + + } + /> + )} @@ -125,7 +135,7 @@ export const GoogleAnalyticsRealtime: React.FC = ( /> {regionReports.length ? ( - renderList(regionReports) + renderRegionList(regionReports) ) : ( )}