Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
display localized type in reports table
Maxime-J34d3d166415a
diff --git a/src/components/pages/reports/ReportsTable.js b/src/components/pages/reports/ReportsTable.jsindex 4073fbec0..52488c11e 100644--- a/src/components/pages/reports/ReportsTable.js+++ b/src/components/pages/reports/ReportsTable.js@@ -5,6 +5,7 @@ import { useMessages } from 'components/hooks';import useUser from 'components/hooks/useUser';import { useState } from 'react';import { Button, Flexbox, Icon, Icons, Modal, Text } from 'react-basics';+import { REPORT_TYPES } from 'lib/constants';export function ReportsTable({data = [],@@ -34,6 +35,15 @@ export function ReportsTable({{ name: 'action', label: ' ' },];+ const cellRender = (row, data, key) => {+ if (key === 'type') {+ return formatMessage(+ labels[Object.keys(REPORT_TYPES).find(key => REPORT_TYPES[key] === row.type)],+ );+ }+ return data[key];+ };+const handleConfirm = () => {onDelete(report.id);};@@ -42,6 +52,7 @@ export function ReportsTable({<><SettingsTablecolumns={columns}+ cellRender={cellRender}data={data}showSearch={true}showPaging={true}