: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 { NewTicket } from './NewTicket'
import { RestoreTickets } from './RestoreTickets'
import { sidepanelTicketsLogic } from './sidepanelTicketsLogic'
import { Ticket } from './Ticket'
import { TicketsList } from './TicketsList'
export function SidePanelTickets(): JSX.Element {
const { view, newTicketDraftRevision } = useValues(sidepanelTicketsLogic)
const hasIdentityMode = !!window.JS_POSTHOG_IDENTITY_DISTINCT_ID
return (
<div>
{view === 'list' && <TicketsList />}
{view === 'ticket' && <Ticket />}
{/* Key on the draft revision so a prefill injected while the composer is already open
remounts the editor (it only reads initial content at creation) */}
{view === 'new' && <NewTicket key={newTicketDraftRevision} />}
{view === 'restore' && !hasIdentityMode && <RestoreTickets />}
</div>
)
}