From 92105fa5ba097e4f01fa597cefaf08f089778358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Obermu=CC=88ller?= Date: Sun, 29 Oct 2023 08:44:12 +0100 Subject: [PATCH] replace insightDateFilterLogic in insightCommandLogic --- frontend/src/scenes/insights/insightCommandLogic.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frontend/src/scenes/insights/insightCommandLogic.ts b/frontend/src/scenes/insights/insightCommandLogic.ts index 21141090ba69a..7a46c062c51d2 100644 --- a/frontend/src/scenes/insights/insightCommandLogic.ts +++ b/frontend/src/scenes/insights/insightCommandLogic.ts @@ -6,7 +6,7 @@ import { RiseOutlined } from '@ant-design/icons' import { dateMapping } from 'lib/utils' import { InsightLogicProps } from '~/types' import { keyForInsightLogicProps } from 'scenes/insights/sharedUtils' -import { insightDateFilterLogic } from 'scenes/insights/filters/InsightDateFilter/insightDateFilterLogic' +import { insightVizDataLogic } from './insightVizDataLogic' const INSIGHT_COMMAND_SCOPE = 'insights' @@ -15,11 +15,7 @@ export const insightCommandLogic = kea([ key(keyForInsightLogicProps('new')), path((key) => ['scenes', 'insights', 'insightCommandLogic', key]), - connect((props: InsightLogicProps) => [ - commandPaletteLogic, - compareFilterLogic(props), - insightDateFilterLogic(props), - ]), + connect((props: InsightLogicProps) => [commandPaletteLogic, compareFilterLogic(props), insightVizDataLogic(props)]), events(({ props }) => ({ afterMount: () => { const funnelCommands: Command[] = [ @@ -37,7 +33,10 @@ export const insightCommandLogic = kea([ icon: RiseOutlined, display: `Set Time Range to ${key}`, executor: () => { - insightDateFilterLogic(props).actions.setDates(values[0], values[1]) + insightVizDataLogic(props).actions.updateDateRange({ + date_from: values[0], + date_to: values[1], + }) }, })), ],