Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

add errors tab support

Blue Mouse6e36350f2b77
diff --git a/web/app/pages/Project/View/components/InteractiveMap.tsx b/web/app/pages/Project/View/components/InteractiveMap.tsx
index db315a8af..5ae38f318 100644
--- a/web/app/pages/Project/View/components/InteractiveMap.tsx
+++ b/web/app/pages/Project/View/components/InteractiveMap.tsx
@@ -46,6 +46,7 @@ const InteractiveMap = ({ data, onClickCountry, total }: InteractiveMapProps) =>
)
const isTrafficTab = activeTab === PROJECT_TABS.traffic
+ const isErrorsTab = activeTab === PROJECT_TABS.errors
const onMouseMove = (e: React.MouseEvent<SVGSVGElement, MouseEvent>) => {
const rect = e.currentTarget.getBoundingClientRect()
@@ -67,7 +68,7 @@ const InteractiveMap = ({ data, onClickCountry, total }: InteractiveMapProps) =>
key={value}
id={value}
className={cx(
- isTrafficTab
+ isTrafficTab || isErrorsTab
? {
'hover:opacity-90': perc > 0,
'fill-[#cfd1d4] dark:fill-[#465d7e46]': perc === 0,
@@ -122,14 +123,15 @@ const InteractiveMap = ({ data, onClickCountry, total }: InteractiveMapProps) =>
>
<strong>{dataHover.countries}</strong>
<br />
- {isTrafficTab ? t('project.unique') : t('dashboard.pageLoad')}: &nbsp;
+ {isTrafficTab ? t('project.unique') : isErrorsTab ? t('project.occurrences') : t('dashboard.pageLoad')}:
+ &nbsp;
<strong
className={cx({
'dark:text-indigo-400': isTrafficTab || dataHover.data < 5,
'dark:text-red-400': !isTrafficTab && dataHover.data >= 5,
})}
>
- {isTrafficTab
+ {isTrafficTab || isErrorsTab
? nFormatter(dataHover.data, 1)
: getStringFromTime(getTimeFromSeconds(dataHover.data), true)}
</strong>