From 768dbec443e6d98f93485ab71a1a406f7f36cf36 Mon Sep 17 00:00:00 2001 From: thanhdanh27600 Date: Mon, 16 Oct 2023 21:19:20 +0700 Subject: [PATCH] fix bug when no data --- src/components/atoms/BarChart.tsx | 2 ++ .../screens/URLTracking/HistoryByCountry.tsx | 35 +++++++++++-------- src/utils/country.ts | 1 + 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/components/atoms/BarChart.tsx b/src/components/atoms/BarChart.tsx index 8e1260b3..9a9d90d4 100644 --- a/src/components/atoms/BarChart.tsx +++ b/src/components/atoms/BarChart.tsx @@ -44,6 +44,8 @@ export const BarChart = (props: Props) => { } }, [loaded, google]); + if (value.length === 0) return null; + return ( <>