: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { MakeLogicType, actions, afterMount, kea, listeners, path, props } from 'kea'
import { toolbarPosthogJS } from '~/toolbar/shared/toolbarPosthogJS'
export interface ToolbarLockedFeatureLogicProps {
featureName: string
}
// Generated by kea-typegen. Update if you're an agent, ignore if you're human.
export interface toolbarLockedFeatureLogicActions {
reportViewPlansClicked: () => {
value: true
}
}
export type toolbarLockedFeatureLogicType = MakeLogicType<
{},
toolbarLockedFeatureLogicActions,
ToolbarLockedFeatureLogicProps
>
export const toolbarLockedFeatureLogic = kea<toolbarLockedFeatureLogicType>([
props({} as ToolbarLockedFeatureLogicProps),
path(['toolbar', 'bar', 'toolbarLockedFeatureLogic']),
actions({
reportViewPlansClicked: true,
}),
listeners(({ props }) => ({
reportViewPlansClicked: () => {
toolbarPosthogJS.capture('toolbar locked feature view plans clicked', { feature: props.featureName })
},
})),
afterMount(({ props }) => {
toolbarPosthogJS.capture('toolbar locked feature viewed', { feature: props.featureName })
}),
])