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.

916 B
Raw Blame
import { BindLogic, useMountedLogic, useValues } from 'kea'

import { BIConnectionGroup } from 'products/business_intelligence/frontend/BIConnectionGroup'
import { biConnectionsLogic } from 'products/business_intelligence/frontend/biConnectionsLogic'
import { biEditorLogic } from 'products/business_intelligence/frontend/biEditorLogic'

export function BIConnections(): JSX.Element {
    const biLogic = useMountedLogic(biEditorLogic)
    const logicProps = { tabId: biLogic.props.tabId }
    const { filteredConnections } = useValues(biConnectionsLogic(logicProps))
    return (
        <BindLogic logic={biConnectionsLogic} props={logicProps}>
            {filteredConnections.length ? (
                <div className="px-2 pb-1 pt-2 text-xs font-semibold text-secondary">Related tables</div>
            ) : null}
            <BIConnectionGroup connections={filteredConnections} />
        </BindLogic>
    )
}