mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
- Added session storage flag to track local login success, ensuring OAuth flows do not double track login events. - Implemented tracking for logout events in both UserDropdown and AppSidebar components, resetting PostHog identity accordingly. - Minor formatting adjustments in GoogleLoginButton and footer-new components for consistency.
21 lines
577 B
TypeScript
21 lines
577 B
TypeScript
"use client";
|
|
|
|
import { PostHogProvider as PHProvider } from "@posthog/react";
|
|
import posthog from "posthog-js";
|
|
import type { ReactNode } from "react";
|
|
import { PostHogIdentify } from "./PostHogIdentify";
|
|
|
|
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}>
|
|
<PostHogIdentify />
|
|
{children}
|
|
</PHProvider>
|
|
);
|
|
}
|