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.

898 B
Raw Blame
import { useActions, useValues } from 'kea'

import { IntervalFilterStandalone } from 'lib/components/IntervalFilter'
import { PagePerformanceCardHeader } from 'scenes/web-analytics/PagePerformanceCardHeader'
import { webAnalyticsLogic } from 'scenes/web-analytics/webAnalyticsLogic'

export function SearchAndAiTrendHeader({ title }: { title: string }): JSX.Element {
    const {
        dateFilter: { interval },
    } = useValues(webAnalyticsLogic)
    const { setDateInterval } = useActions(webAnalyticsLogic)

    return (
        <PagePerformanceCardHeader
            title={title}
            actions={
                <div className="flex items-center gap-2">
                    <span className="text-secondary">Group by</span>
                    <IntervalFilterStandalone interval={interval} onIntervalChange={setDateInterval} />
                </div>
            }
        />
    )
}