From 3182cdbf06abb3971101f46a8e36ffcc10c9b251 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 9 Jan 2023 16:34:31 +0100 Subject: [PATCH] feat(ui) - insights - wip --- .../InsightsCard/InsightsCard.tsx | 11 ++++++++++- .../Dashboard/components/WidgetChart/WidgetChart.tsx | 8 -------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard/InsightsCard.tsx b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard/InsightsCard.tsx index a100158e6..489c76fd2 100644 --- a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard/InsightsCard.tsx +++ b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard/InsightsCard.tsx @@ -12,11 +12,20 @@ const data = [ ]; interface Props {} function InsightsCard(props: Props) { - const { metricStore } = useStore(); + const { metricStore, dashboardStore } = useStore(); const metric = metricStore.instance; + const drillDownFilter = dashboardStore.drillDownFilter; + const period = dashboardStore.period; const clickHanddler = (e: React.MouseEvent) => { console.log(e); + // TODO update drillDownFilter + // const periodTimestamps = period.toTimestamps(); + // drillDownFilter.merge({ + // filters: event, + // startTimestamp: periodTimestamps.startTimestamp, + // endTimestamp: periodTimestamps.endTimestamp, + // }); }; return ( diff --git a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx index d522c299a..5d615815b 100644 --- a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx +++ b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx @@ -95,15 +95,7 @@ function WidgetChart(props: Props) { const renderChart = () => { const { metricType, viewType, metricOf } = metric; - const metricWithData = { ...metric, data }; - if (metricType === 'sessions') { - return - } - - // if (metricType === ERRORS) { - // return - // } if (metricType === FUNNEL) { return