mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 16:56:22 +02:00
feat: enhance login tracking and logout functionality
- 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.
This commit is contained in:
parent
458c152032
commit
d20aef2957
8 changed files with 84 additions and 4 deletions
|
|
@ -3,6 +3,7 @@
|
|||
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;
|
||||
|
|
@ -11,5 +12,10 @@ interface PostHogProviderProps {
|
|||
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>;
|
||||
return (
|
||||
<PHProvider client={posthog}>
|
||||
<PostHogIdentify />
|
||||
{children}
|
||||
</PHProvider>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue