Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

1.3 KB
Raw Blame
import { MakeLogicType, afterMount, connect, kea, path, selectors } from 'kea'

import { exportsLogic } from 'lib/components/ExportButton/exportsLogic'
import { sceneConfigurations } from 'scenes/scenes'
import { Scene } from 'scenes/sceneTypes'

import { Breadcrumb } from '~/types'

// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface exportsSceneLogicValues {
    breadcrumbs: Breadcrumb[]
}

// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface exportsSceneLogicActions {
    loadExports: () => {
        value: true
    } // exportsLogic
}

export type exportsSceneLogicType = MakeLogicType<exportsSceneLogicValues, exportsSceneLogicActions>

export const exportsSceneLogic = kea<exportsSceneLogicType>([
    path(['scenes', 'exports', 'exportsSceneLogic']),
    connect(() => ({
        actions: [exportsLogic, ['loadExports']],
    })),
    selectors({
        breadcrumbs: [
            () => [],
            (): Breadcrumb[] => [
                {
                    key: Scene.Exports,
                    name: sceneConfigurations[Scene.Exports].name,
                    iconType: sceneConfigurations[Scene.Exports].iconType || 'default_icon_type',
                },
            ],
        ],
    }),
    afterMount(({ actions }) => {
        actions.loadExports()
    }),
])