mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 09:46:25 +02:00
feat: added posthog
This commit is contained in:
parent
d9e6947fbd
commit
518958e9a7
15 changed files with 526 additions and 17 deletions
15
surfsense_web/components/providers/PostHogProvider.tsx
Normal file
15
surfsense_web/components/providers/PostHogProvider.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"use client";
|
||||
|
||||
import { PostHogProvider as PHProvider } from "@posthog/react";
|
||||
import posthog from "posthog-js";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
interface PostHogProviderProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export function PostHogProvider({ children }: PostHogProviderProps) {
|
||||
// posthog-js is already initialized in instrumentation-client.ts
|
||||
// We just need to wrap the app with the PostHogProvider for hook access
|
||||
return <PHProvider client={posthog}>{children}</PHProvider>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue