Files
zeekay e43ab1afe7 chore: rename all PostHog references to Insights/Hanzo
Bulk rename across 989 files:
- Package names: posthog-js → @hanzo/insights, posthog-node → @hanzo/insights-node, etc.
- Repository URLs: posthog/posthog-js → hanzoai/insights-js
- Brand names: PostHog → Insights
- File renames: 259 reference JSON files, source files, workflow files
- Directory rename: eslint-plugin-posthog-js → eslint-plugin-insights

Remaining: 8 refs to @posthog/rrweb-* (real npm deps, need fork+publish)
2026-03-06 01:41:12 -08:00

35 lines
986 B
TypeScript

import { useInsights } from '@hanzo/insights/react'
import { useEffect, useState } from 'react'
export default function Home() {
const insights = useInsights()
const [otherHost, setOtherHost] = useState('')
useEffect(() => {
setOtherHost(window.location.origin.includes('other-localhost') ? 'localhost' : 'other-localhost')
})
return (
<>
<h1>Iframes</h1>
<h2>Cross origin iframe</h2>
<p>
This loads the same page but from <b>other-localhost</b> which you need to add to your hosts file.
</p>
{otherHost && (
<iframe
className="border rounded"
src={`http://${otherHost}:3000/`}
style={{ width: '100%', height: '500px' }}
onLoad={() => {
insights.capture('iframe loaded')
}}
/>
)}
</>
)
}