: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 { useValues } from 'kea'
import { onboardingWelcomeLogic } from './onboardingWelcomeLogic'
import { WelcomeLoading } from './WelcomeLoading'
import { WelcomeProductReady } from './WelcomeProductReady'
import { WelcomeProductStatus } from './WelcomeProductStatus'
import { WelcomeWizardCallout } from './WelcomeWizardCallout'
export function WelcomeProductPanel(): JSX.Element {
const { selectedProduct, selectedEmptyState } = useValues(onboardingWelcomeLogic)
if (!selectedProduct || selectedEmptyState === undefined) {
return <WelcomeLoading />
}
const { key, product } = selectedProduct
return (
<div className="flex flex-col gap-4">
<WelcomeWizardCallout />
{/* Keyed so switching products remounts the next product's detection and celebration. */}
{selectedEmptyState ? (
<WelcomeProductStatus key={key} emptyState={selectedEmptyState} product={product} />
) : (
<WelcomeProductReady key={key} product={product} />
)}
</div>
)
}