From d4bfc84ff3756f32456ebaffd2eef3bc3ca4e7e2 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 4 Dec 2020 20:45:12 -0800 Subject: [PATCH] Fix event value display. --- components/metrics/EventsTable.js | 2 +- pages/api/website/[id]/metrics.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/metrics/EventsTable.js b/components/metrics/EventsTable.js index c415a3e9..437942fb 100644 --- a/components/metrics/EventsTable.js +++ b/components/metrics/EventsTable.js @@ -17,7 +17,7 @@ export default function EventsTable({ websiteId, ...props }) { } const Label = ({ value }) => { - const [event, label] = value.split(':'); + const [event, label] = value.split('\t'); return ( <> {event} diff --git a/pages/api/website/[id]/metrics.js b/pages/api/website/[id]/metrics.js index 2aca489f..ef736ee0 100644 --- a/pages/api/website/[id]/metrics.js +++ b/pages/api/website/[id]/metrics.js @@ -20,7 +20,7 @@ function getTable(type) { function getColumn(type) { if (type === 'event') { - return `concat(event_type, ':', event_value)`; + return `concat(event_type, '\t', event_value)`; } return type; }