: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 { useActions } from 'kea'
import { router } from 'kea-router'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
import { urls } from 'scenes/urls'
import { SubscriptionsSceneModal } from '../scenes/components/SubscriptionsSceneModal'
/**
* Create button for the subscriptions empty state. The creation modal belongs to the
* scene the gate replaces, so the empty state renders it too - otherwise the button
* would change the URL and open nothing.
*/
export function SubscriptionsPrimaryAction(): JSX.Element {
const { push } = useActions(router)
return (
<>
<LemonButton
type="primary"
onClick={() => push(urls.subscriptionNew())}
data-attr="new-subscription-button"
>
Create your first subscription
</LemonButton>
<SubscriptionsSceneModal />
</>
)
}