From ec679151bbfadd08345a7de7ba9b551f2be5a982 Mon Sep 17 00:00:00 2001 From: David Newell Date: Tue, 19 Sep 2023 10:07:26 +0100 Subject: [PATCH] feat: use cached insight result in SavedInsight (#17510) --- frontend/src/queries/nodes/SavedInsight/SavedInsight.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/frontend/src/queries/nodes/SavedInsight/SavedInsight.tsx b/frontend/src/queries/nodes/SavedInsight/SavedInsight.tsx index 4ccc6660ca9b0..1b14be082c320 100644 --- a/frontend/src/queries/nodes/SavedInsight/SavedInsight.tsx +++ b/frontend/src/queries/nodes/SavedInsight/SavedInsight.tsx @@ -3,19 +3,18 @@ import { useValues } from 'kea' import { insightLogic } from 'scenes/insights/insightLogic' import { Query } from '~/queries/Query/Query' import { SavedInsightNode, QueryContext } from '~/queries/schema' -import { InsightLogicProps, InsightModel } from '~/types' +import { InsightLogicProps } from '~/types' import { Animation } from 'lib/components/Animation/Animation' import { AnimationType } from 'lib/animations/animations' import { insightDataLogic } from 'scenes/insights/insightDataLogic' interface InsightProps { query: SavedInsightNode - cachedResults?: Partial | null context?: QueryContext } -export function SavedInsight({ query: propsQuery, context, cachedResults }: InsightProps): JSX.Element { - const insightProps: InsightLogicProps = { dashboardItemId: propsQuery.shortId, cachedInsight: cachedResults } +export function SavedInsight({ query: propsQuery, context }: InsightProps): JSX.Element { + const insightProps: InsightLogicProps = { dashboardItemId: propsQuery.shortId } const { insight, insightLoading } = useValues(insightLogic(insightProps)) const { query: dataQuery } = useValues(insightDataLogic(insightProps)) @@ -33,5 +32,5 @@ export function SavedInsight({ query: propsQuery, context, cachedResults }: Insi const query = { ...propsQuery, ...dataQuery, full: propsQuery.full } - return + return }