removed posthog identifier (#18253)
This commit is contained in:
1 parent
460e511459
commit
b56824e626
7 files changed
+2
-172
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { useSession } from "next-auth/react";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
import type { Dispatch, ReactElement, ReactNode, SetStateAction } from "react";
|
||||
import React, { cloneElement, useEffect } from "react";
|
||||
import React, { cloneElement } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
||||
import { useRedirectToLoginIfUnauthenticated } from "@calcom/features/auth/lib/hooks/useRedirectToLoginIfUnauthenticated";
|
||||
@@ -16,7 +16,6 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { useNotifications } from "@calcom/lib/hooks/useNotifications";
|
||||
import { Button, ErrorBoundary, HeadSeo, SkeletonText } from "@calcom/ui";
|
||||
|
||||
import usePostHog from "../ee/event-tracking/lib/posthog/userPostHog";
|
||||
import { SideBarContainer } from "./SideBar";
|
||||
import { TopNavContainer } from "./TopNav";
|
||||
import { BannerContainer } from "./banners/LayoutBanner";
|
||||
@@ -27,19 +26,12 @@ import { useAppTheme } from "./useAppTheme";
|
||||
const Layout = (props: LayoutProps) => {
|
||||
const { banners, bannersHeight } = useBanners();
|
||||
const pathname = usePathname();
|
||||
const postHog = usePostHog();
|
||||
const isFullPageWithoutSidebar = pathname?.startsWith("/apps/routing-forms/reporting/");
|
||||
const pageTitle = typeof props.heading === "string" && !props.title ? props.heading : props.title;
|
||||
const withoutSeo = props.withoutSeo ?? props.withoutMain ?? false;
|
||||
useBootIntercom();
|
||||
useFormbricks();
|
||||
|
||||
useEffect(() => {
|
||||
if (!props.isPublic) {
|
||||
postHog.identify();
|
||||
}
|
||||
}, [props.isPublic, postHog]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{!withoutSeo && (
|
||||
|
||||
@@ -21,7 +21,6 @@ import {
|
||||
// TODO (Platform): we shouldnt be importing from web here
|
||||
import { useGetUserAttributes } from "@calcom/web/components/settings/platform/hooks/useGetUserAttributes";
|
||||
|
||||
import usePostHog from "../../ee/event-tracking/lib/posthog/userPostHog";
|
||||
import FreshChatProvider from "../../ee/support/lib/freshchat/FreshChatProvider";
|
||||
|
||||
interface UserDropdownProps {
|
||||
@@ -32,7 +31,6 @@ export function UserDropdown({ small }: UserDropdownProps) {
|
||||
const { t } = useLocale();
|
||||
const { data: user } = useMeQuery();
|
||||
const pathname = usePathname();
|
||||
const posthog = usePostHog();
|
||||
const isPlatformPages = pathname?.startsWith("/settings/platform");
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
@@ -207,8 +205,6 @@ export function UserDropdown({ small }: UserDropdownProps) {
|
||||
StartIcon="log-out"
|
||||
aria-hidden="true"
|
||||
onClick={() => {
|
||||
posthog.capture("sign_out");
|
||||
posthog.reset();
|
||||
signOut({ callbackUrl: "/auth/logout" });
|
||||
}}>
|
||||
{t("sign_out")}
|
||||
|
||||
Reference in new issue
Block a user