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.

743 B
Raw Blame
import { dayjs } from 'lib/dayjs'
import { eventToDescription } from 'lib/utils/events'

import { EventType } from '~/types'

import { EventIcon } from './EventIcon'

type SessionEventProps = { event: EventType }

export const SessionEvent = ({ event }: SessionEventProps): JSX.Element => (
    <div className="relative flex items-center justify-between border rounded pl-3 pr-4 py-1 bg-surface-primary text-xs">
        <div className="flex items-center">
            <EventIcon event={event} />
            <b className="ml-3">{eventToDescription(event)}</b>
        </div>
        <div className="flex items-center text-secondary font-bold">
            <span>{dayjs(event.timestamp).format('h:mm:ss A')}</span>
        </div>
    </div>
)