Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr committed Jun 19, 2024
1 parent 48de270 commit 295bc63
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
1 change: 0 additions & 1 deletion frontend/src/lib/utils/eventUsageLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import {
InsightModel,
InsightShortId,
InsightType,
ItemMode,
MultipleSurveyQuestion,
PersonType,
PropertyFilterType,
Expand Down
26 changes: 0 additions & 26 deletions frontend/src/scenes/insights/insightLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { loaders } from 'kea-loaders'
import { router } from 'kea-router'
import api from 'lib/api'
import { TriggerExportProps } from 'lib/components/ExportButton/exporter'
import { parseProperties } from 'lib/components/PropertyFilters/utils'
import { DashboardPrivilegeLevel } from 'lib/constants'
import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'
import { getEventNamesForAction, objectsEqual, toParams } from 'lib/utils'
Expand Down Expand Up @@ -469,31 +468,6 @@ export const insightLogic = kea<insightLogicType>([
return null
},
],
isUsingSessionAnalysis: [
(s) => [s.filters],
(filters: Partial<FilterType>): boolean => {
const entities = (filters.events || []).concat(filters.actions ?? [])
const using_session_breakdown = filters.breakdown_type === 'session'
const using_session_math = entities.some((entity) => entity.math === 'unique_session')
const using_session_property_math = entities.some((entity) => {
// Should be made more generic is we ever add more session properties
return entity.math_property === '$session_duration'
})
const using_entity_session_property_filter = entities.some((entity) => {
return parseProperties(entity.properties).some((property) => property.type === 'session')
})
const using_global_session_property_filter = parseProperties(filters.properties).some(
(property) => property.type === 'session'
)
return (
using_session_breakdown ||
using_session_math ||
using_session_property_math ||
using_entity_session_property_filter ||
using_global_session_property_filter
)
},
],
showPersonsModal: [() => [(_, p) => p.query], (query?: InsightVizNode) => !query || !query.hidePersonsModal],
}),
listeners(({ actions, values }) => ({
Expand Down

0 comments on commit 295bc63

Please sign in to comment.