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.

730 B
Raw Blame
import { useActions, useValues } from 'kea'

import { LemonTabs } from '@posthog/lemon-ui'

import type { SceneTabKey } from '../../types'
import { type SceneTabConfig, scenesTabsLogic } from './scenesTabsLogic'

export function ScenesTabs(): JSX.Element {
    const { tabs, activeTab } = useValues(scenesTabsLogic)
    const { setTab } = useActions(scenesTabsLogic)

    return (
        <>
            <LemonTabs
                activeKey={activeTab}
                tabs={tabs.map((tab: SceneTabConfig) => ({
                    key: tab.key,
                    label: tab.label,
                }))}
                onChange={(key) => setTab(key as SceneTabKey)}
                sceneInset
            />
        </>
    )
}