From 1537ed7db7be3054c52117da90ceeaf3ce424bb0 Mon Sep 17 00:00:00 2001 From: Akash Rajpurohit Date: Mon, 12 Jun 2023 22:08:09 +0530 Subject: [PATCH 1/2] fix: :bug: tracker event data fixed --- tracker/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracker/index.js b/tracker/index.js index 1c40036e..04a3f3e9 100644 --- a/tracker/index.js +++ b/tracker/index.js @@ -106,7 +106,7 @@ } }); - return track(eventName, { data: eventData }); + return track(eventName, eventData); } return Promise.resolve(); }; From d04d4ccf77b8f83ab20244b1fc4577d0367cba7a Mon Sep 17 00:00:00 2001 From: AkashRajpurohit Date: Thu, 13 Jul 2023 21:07:51 +0530 Subject: [PATCH 2/2] feat: :sparkles: added country flag on realtime page --- components/pages/realtime/RealtimeCountries.js | 13 +++++++++++-- .../pages/realtime/RealtimeCountries.module.css | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 components/pages/realtime/RealtimeCountries.module.css diff --git a/components/pages/realtime/RealtimeCountries.js b/components/pages/realtime/RealtimeCountries.js index 525eb28f..62964eab 100644 --- a/components/pages/realtime/RealtimeCountries.js +++ b/components/pages/realtime/RealtimeCountries.js @@ -1,17 +1,26 @@ import { useCallback } from 'react'; +import { useRouter } from 'next/router'; import DataTable from 'components/metrics/DataTable'; import useLocale from 'hooks/useLocale'; import useCountryNames from 'hooks/useCountryNames'; import useMessages from 'hooks/useMessages'; +import classNames from 'classnames'; +import styles from './RealtimeCountries.module.css'; export function RealtimeCountries({ data }) { const { formatMessage, labels } = useMessages(); const { locale } = useLocale(); const countryNames = useCountryNames(locale); + const { basePath } = useRouter(); const renderCountryName = useCallback( - ({ x }) => {countryNames[x]}, - [countryNames, locale], + ({ x: code }) => ( + + {code} + {countryNames[code]} + + ), + [countryNames, locale, basePath], ); return ( diff --git a/components/pages/realtime/RealtimeCountries.module.css b/components/pages/realtime/RealtimeCountries.module.css new file mode 100644 index 00000000..e55063c3 --- /dev/null +++ b/components/pages/realtime/RealtimeCountries.module.css @@ -0,0 +1,5 @@ +.row { + display: flex; + align-items: center; + gap: 10px; +}