Skip to content

Commit b1a6433

Browse files
committed
refactor: move side effect components to bottom
1 parent 1f1afea commit b1a6433

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/(app)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ export default function Layout({ children }: { children: React.ReactNode }) {
88
return (
99
<ProtectedRoute>
1010
<AuthorizedApolloWrapper>
11-
<PostHogIdentifier />
1211
<AppShell>
1312
<div className="mx-auto w-full max-w-7xl flex-1 p-3">
1413
<ViewTransition name="app-content">
1514
<div suppressHydrationWarning>{children}</div>
1615
</ViewTransition>
1716
</div>
1817
</AppShell>
18+
<PostHogIdentifier />
1919
</AuthorizedApolloWrapper>
2020
</ProtectedRoute>
2121
);

app/login/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ export default async function LoginPage() {
2222
lg:px-14 lg:py-8
2323
`}
2424
>
25-
{/* Reset the session on the login page */}
26-
<PostHogResetter />
27-
2825
<div className="flex max-w-sm flex-1 flex-col justify-center gap-6">
2926
<Link
3027
href="/"
@@ -66,6 +63,9 @@ export default async function LoginPage() {
6663
</div>
6764
</div>
6865
</div>
66+
67+
{/* Reset the session on the login page */}
68+
<PostHogResetter />
6969
</div>
7070
);
7171
}

instrumentation-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import posthog from "posthog-js";
22

33
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
44
api_host: "/ingest",
5-
ui_host: "https://us.posthog.com",
5+
ui_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
66
defaults: "2025-05-24",
77
capture_exceptions: true, // This enables capturing exceptions using Error Tracking, set to false if you don't want this
88
debug: process.env.NODE_ENV === "development",

0 commit comments

Comments
 (0)