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.

941 B
Raw Blame
/** The footer link that opens the quarantined stories this run rendered clean. */
export function CleanQuarantinedToggle({
    cleanCount,
    loadFailed,
    isExpanded,
    onClick,
}: {
    cleanCount: number
    loadFailed: boolean
    isExpanded: boolean
    onClick: () => void
}): JSX.Element {
    if (loadFailed) {
        return <span>Couldn't load the quarantined stories. Reload the page.</span>
    }
    return (
        <button
            type="button"
            onClick={onClick}
            aria-expanded={isExpanded}
            data-attr="visual-review-toggle-clean-quarantined"
            className="shrink-0 text-xs text-muted hover:text-default hover:underline underline-offset-2 transition-colors"
        >
            {isExpanded
                ? 'Hide clean quarantined stories'
                : `${cleanCount} quarantined ${cleanCount === 1 ? 'story' : 'stories'} rendered clean`}
        </button>
    )
}