File tree Expand file tree Collapse file tree 7 files changed +16
-17
lines changed Expand file tree Collapse file tree 7 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export default function RootLayout({
6363 />
6464 < PosthogHeadSetup />
6565 </ head >
66- < PHProvider >
66+ < PHProvider disable_session_recording = { true } >
6767 < PostHogPageView />
6868 < body
6969 className = { cn (
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { ThirdwebProvider } from "thirdweb/react";
55import { PHProvider } from "../../../../lib/posthog/Posthog" ;
66import { PostHogPageView } from "../../../../lib/posthog/PosthogPageView" ;
77
8- export function Providers ( { children } : { children : React . ReactNode } ) {
8+ export function BridgeProviders ( { children } : { children : React . ReactNode } ) {
99 return (
1010 < ThirdwebProvider >
1111 < ThemeProvider
@@ -14,7 +14,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
1414 enableSystem = { false }
1515 defaultTheme = "dark"
1616 >
17- < PHProvider >
17+ < PHProvider disable_session_recording = { true } >
1818 < PostHogPageView />
1919 { children }
2020 < Toaster richColors theme = "dark" />
Original file line number Diff line number Diff line change 11import { cn } from "@/lib/utils" ;
22import { Inter } from "next/font/google" ;
33import "../../global.css" ;
4- import { Providers } from "./components/client/Providers.client" ;
4+ import { BridgeProviders } from "./components/client/Providers.client" ;
55
66const fontSans = Inter ( {
77 subsets : [ "latin" ] ,
@@ -22,7 +22,7 @@ export default function BridgeLayout({
2222 fontSans . variable ,
2323 ) }
2424 >
25- < Providers > { children } </ Providers >
25+ < BridgeProviders > { children } </ BridgeProviders >
2626 </ body >
2727 </ html >
2828 ) ;
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export default function Layout(props: {
3939 < link rel = "icon" href = "/assets/nebula/favicon.ico" />
4040 < PosthogHeadSetup />
4141 </ head >
42- < PHProvider >
42+ < PHProvider disable_session_recording = { false } >
4343 < PostHogPageView />
4444 < body
4545 className = { cn (
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import { ThirdwebProvider } from "thirdweb/react";
44import { PHProvider } from "../../../../lib/posthog/Posthog" ;
55import { PostHogPageView } from "../../../../lib/posthog/PosthogPageView" ;
66
7- export function Providers ( { children } : { children : React . ReactNode } ) {
7+ export function PayProviders ( { children } : { children : React . ReactNode } ) {
88 return (
99 < ThirdwebProvider >
10- < PHProvider >
10+ < PHProvider disable_session_recording = { true } >
1111 < PostHogPageView />
1212 { children }
1313 < Toaster richColors theme = "dark" />
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import "../../global.css";
22import { cn } from "@/lib/utils" ;
33import { ThemeProvider } from "next-themes" ;
44import { Inter } from "next/font/google" ;
5- import { Providers } from "./components/client/Providers.client" ;
5+ import { PayProviders } from "./components/client/Providers.client" ;
66
77const fontSans = Inter ( {
88 subsets : [ "latin" ] ,
@@ -23,7 +23,7 @@ export default async function PayLayout({
2323 fontSans . variable ,
2424 ) }
2525 >
26- < Providers >
26+ < PayProviders >
2727 < ThemeProvider
2828 attribute = "class"
2929 disableTransitionOnChange
@@ -43,7 +43,7 @@ export default async function PayLayout({
4343 />
4444 </ div >
4545 </ ThemeProvider >
46- </ Providers >
46+ </ PayProviders >
4747 </ body >
4848 </ html >
4949 ) ;
Original file line number Diff line number Diff line change @@ -7,10 +7,9 @@ import { useEffect } from "react";
77
88const NEXT_PUBLIC_POSTHOG_API_KEY = process . env . NEXT_PUBLIC_POSTHOG_API_KEY ;
99
10- export function PHProvider ( {
11- children,
12- } : {
10+ export function PHProvider ( props : {
1311 children : React . ReactNode ;
12+ disable_session_recording : boolean ;
1413} ) {
1514 // eslint-disable-next-line no-restricted-syntax
1615 useEffect ( ( ) => {
@@ -19,10 +18,10 @@ export function PHProvider({
1918 api_host : "https://a.thirdweb.com" ,
2019 capture_pageview : false ,
2120 debug : false ,
22- disable_session_recording : true ,
21+ disable_session_recording : props . disable_session_recording ,
2322 } ) ;
2423 }
25- } , [ ] ) ;
24+ } , [ props . disable_session_recording ] ) ;
2625
27- return < PostHogProvider client = { posthog } > { children } </ PostHogProvider > ;
26+ return < PostHogProvider client = { posthog } > { props . children } </ PostHogProvider > ;
2827}
You can’t perform that action at this time.
0 commit comments