chore: initialize project
Deploy monie-web to prod (kaniko) / build-and-deploy (push) Successful in 12m10s
Deploy monie-web to prod (kaniko) / build-and-deploy (push) Successful in 12m10s
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import posthog from 'posthog-js'
|
||||
import { PostHogProvider as BasePostHogProvider } from '@posthog/react'
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
if (typeof window !== 'undefined' && import.meta.env.VITE_POSTHOG_KEY) {
|
||||
posthog.init(import.meta.env.VITE_POSTHOG_KEY, {
|
||||
api_host: import.meta.env.VITE_POSTHOG_HOST || 'https://us.i.posthog.com',
|
||||
person_profiles: 'identified_only',
|
||||
capture_pageview: false,
|
||||
defaults: '2025-11-30',
|
||||
})
|
||||
}
|
||||
|
||||
interface PostHogProviderProps {
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
export default function PostHogProvider({ children }: PostHogProviderProps) {
|
||||
return <BasePostHogProvider client={posthog}>{children}</BasePostHogProvider>
|
||||
}
|
||||
Reference in New Issue
Block a user