Skip to content

Commit 68e1b5a

Browse files
committed
fix: disable SSR for PostHogIdentifier
There must be something wrong for PostHog or Next.js canary…
1 parent fa599f9 commit 68e1b5a

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

app/(app)/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import AppShell from "@/components/app-shell";
2-
import PostHogIdentifier from "@/providers/posthog-identifier";
2+
import DynamicPostHogIdentifier from "@/providers/posthog-identifier.dynamic";
33
import AuthorizedApolloWrapper from "@/providers/use-apollo.rsc";
44
import ProtectedRoute from "@/providers/use-protected-route";
55
import { unstable_ViewTransition as ViewTransition } from "react";
@@ -15,7 +15,7 @@ export default function Layout({ children }: { children: React.ReactNode }) {
1515
</ViewTransition>
1616
</div>
1717
</AppShell>
18-
<PostHogIdentifier />
18+
<DynamicPostHogIdentifier />
1919
</AuthorizedApolloWrapper>
2020
</ProtectedRoute>
2121
);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"use client";
2+
3+
import dynamic from "next/dynamic";
4+
5+
const DynamicPostHogIdentifier = dynamic(() => import("./posthog-identifier"), {
6+
ssr: false,
7+
});
8+
9+
export default DynamicPostHogIdentifier;

0 commit comments

Comments
 (0)