Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions frontend/src/scenes/project-homepage/projectHomepageLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { MaxContextInput } from 'scenes/max/maxTypes'
import { projectLogic } from 'scenes/projectLogic'
import { urls } from 'scenes/urls'

import { navigationLogic } from '~/layout/navigation/navigationLogic'
import { getQueryBasedInsightModel } from '~/queries/nodes/InsightViz/utils'
import { Breadcrumb, InsightModel } from '~/types'

Expand All @@ -18,7 +17,6 @@ import type { Node } from '../../queries/schema/schema-general'
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface projectHomepageLogicValues {
featureFlags: FeatureFlagsSet // featureFlagLogic
mobileLayout: boolean // navigationLogic
currentProjectId: number | null // projectLogic
breadcrumbs: Breadcrumb[]
expandedInsightIds: Set<string>
Expand Down Expand Up @@ -53,7 +51,7 @@ export interface projectHomepageLogicActions {
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface projectHomepageLogicMeta {
__keaTypeGenInternalSelectorTypes: {
todayHomeEnabled: (featureFlags: FeatureFlagsSet, mobileLayout: boolean) => boolean
todayHomeEnabled: (featureFlags: FeatureFlagsSet) => boolean
}
}

Expand All @@ -67,14 +65,7 @@ export type projectHomepageLogicType = MakeLogicType<
export const projectHomepageLogic = kea<projectHomepageLogicType>([
path(['scenes', 'project-homepage', 'projectHomepageLogic']),
connect(() => ({
values: [
projectLogic,
['currentProjectId'],
featureFlagLogic,
['featureFlags'],
navigationLogic,
['mobileLayout'],
],
values: [projectLogic, ['currentProjectId'], featureFlagLogic, ['featureFlags']],
})),

actions({
Expand Down Expand Up @@ -112,9 +103,8 @@ export const projectHomepageLogic = kea<projectHomepageLogicType>([
selectors({
// Matches the condition that swaps in the Today rail, because Today has no way around without it.
todayHomeEnabled: [
(s) => [s.featureFlags, s.mobileLayout],
(featureFlags: FeatureFlagsSet, mobileLayout: boolean): boolean =>
!!featureFlags[FEATURE_FLAGS.TODAY_RAIL_NAV] && !mobileLayout,
(s) => [s.featureFlags],
(featureFlags: FeatureFlagsSet): boolean => !!featureFlags[FEATURE_FLAGS.TODAY_RAIL_NAV],
],
maxContext: [
() => [],
Expand Down
Loading