Skip to content

Commit

Permalink
fix(funnels): Don't allow persons modal in funnel trends if unavailab…
Browse files Browse the repository at this point in the history
…le (#23759)
  • Loading branch information
Twixes authored Jul 18, 2024
1 parent 6f8c23d commit 2a04631
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion frontend/src/scenes/funnels/FunnelLineGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { isInsightQueryNode } from '~/queries/utils'
import { ChartParams, GraphDataset, GraphType } from '~/types'

import { funnelDataLogic } from './funnelDataLogic'
import { funnelPersonsModalLogic } from './funnelPersonsModalLogic'

const LineGraphWrapper = ({ inCardView, children }: { inCardView?: boolean; children: JSX.Element }): JSX.Element => {
if (inCardView) {
Expand All @@ -23,16 +24,18 @@ const LineGraphWrapper = ({ inCardView, children }: { inCardView?: boolean; chil
export function FunnelLineGraph({
inCardView,
inSharedMode,
showPersonsModal = true,
showPersonsModal: showPersonsModalProp = true,
}: Omit<ChartParams, 'filters'>): JSX.Element | null {
const { insightProps } = useValues(insightLogic)
const { indexedSteps, aggregationTargetLabel, incompletenessOffsetFromEnd, interval, querySource, insightData } =
useValues(funnelDataLogic(insightProps))
const { canOpenPersonModal } = useValues(funnelPersonsModalLogic(insightProps))

if (!isInsightQueryNode(querySource)) {
return null
}

const showPersonsModal = canOpenPersonModal && showPersonsModalProp
const aggregationGroupTypeIndex = querySource.aggregation_group_type_index

return (
Expand Down

0 comments on commit 2a04631

Please sign in to comment.