mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 09:16:22 +02:00
16 lines
487 B
TypeScript
16 lines
487 B
TypeScript
|
|
"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>;
|
||
|
|
}
|