mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Fix dashboard hydration error (#613)
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Emulator Test / docker (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Test / docker (push) Has been cancelled
Runs E2E API Tests / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Mirror main branch to main-mirror-for-wdb / lint_and_build (push) Has been cancelled
Preview Docs / run (push) Has been cancelled
Publish Docs / run (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Emulator Test / docker (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Test / docker (push) Has been cancelled
Runs E2E API Tests / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Mirror main branch to main-mirror-for-wdb / lint_and_build (push) Has been cancelled
Preview Docs / run (push) Has been cancelled
Publish Docs / run (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
This commit is contained in:
parent
08edf30e7e
commit
7cba095945
@ -36,7 +36,7 @@
|
||||
"lucide-react": "^0.378.0",
|
||||
"next": "15.2.3",
|
||||
"next-themes": "^0.2.1",
|
||||
"posthog-js": "^1.234.9",
|
||||
"posthog-js": "^1.235.0",
|
||||
"react": "19.0.0",
|
||||
"react-dom": "19.0.0",
|
||||
"react-globe.gl": "^2.28.2",
|
||||
@ -57,9 +57,9 @@
|
||||
"@types/react-dom": "19.0.4",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"glob": "^10.4.1",
|
||||
"import-in-the-middle": "^1.12.0",
|
||||
"postcss": "^8.4.38",
|
||||
"require-in-the-middle": "^7.4.0",
|
||||
"import-in-the-middle": "^1.12.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"tsx": "^4.7.2"
|
||||
|
||||
@ -5,24 +5,27 @@ import posthog from 'posthog-js';
|
||||
import { PostHogProvider } from 'posthog-js/react';
|
||||
import { Suspense, useEffect, useState } from 'react';
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
const postHogKey = getPublicEnvVar('NEXT_PUBLIC_POSTHOG_KEY') ?? "phc_vIUFi0HzHo7oV26OsaZbUASqxvs8qOmap1UBYAutU4k";
|
||||
if (postHogKey.length > 5) {
|
||||
posthog.init(postHogKey, {
|
||||
session_recording: {
|
||||
maskAllInputs: false,
|
||||
maskInputOptions: {
|
||||
password: true,
|
||||
},
|
||||
},
|
||||
api_host: "/consume",
|
||||
ui_host: "https://eu.i.posthog.com",
|
||||
capture_pageview: false,
|
||||
capture_pageleave: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
export function CSPostHogProvider({ children }: { children: React.ReactNode }) {
|
||||
useEffect(() => {
|
||||
if (typeof window !== 'undefined') {
|
||||
const postHogKey = getPublicEnvVar('NEXT_PUBLIC_POSTHOG_KEY') ?? "phc_vIUFi0HzHo7oV26OsaZbUASqxvs8qOmap1UBYAutU4k";
|
||||
if (postHogKey.length > 5) {
|
||||
posthog.init(postHogKey, {
|
||||
session_recording: {
|
||||
maskAllInputs: false,
|
||||
maskInputOptions: {
|
||||
password: true,
|
||||
},
|
||||
},
|
||||
api_host: "/consume",
|
||||
ui_host: "https://eu.i.posthog.com",
|
||||
capture_pageview: false,
|
||||
capture_pageleave: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
}, []);
|
||||
|
||||
return <PostHogProvider client={posthog}>{children}</PostHogProvider>;
|
||||
}
|
||||
|
||||
|
||||
@ -323,8 +323,8 @@ importers:
|
||||
specifier: ^0.2.1
|
||||
version: 0.2.1(next@15.2.3(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
|
||||
posthog-js:
|
||||
specifier: ^1.234.9
|
||||
version: 1.234.9
|
||||
specifier: ^1.235.0
|
||||
version: 1.235.4
|
||||
react:
|
||||
specifier: 19.0.0
|
||||
version: 19.0.0
|
||||
@ -10129,8 +10129,8 @@ packages:
|
||||
resolution: {integrity: sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
posthog-js@1.234.9:
|
||||
resolution: {integrity: sha512-Qxpg9YOlLa59lbkYcONZ9efmB6KTgkePnkhCTSnKIyUd826cs4J6VDTKHu+V/lugRtWLWB9R7CckvFE8QPaTbg==}
|
||||
posthog-js@1.235.4:
|
||||
resolution: {integrity: sha512-CcAQpw7oaIoOwyaeqNZoKjciIMygrjgn6+cBSWFQcbo7aEmiO2666BZHZH/GBFmz0g2/w5abSpO7UntAj/69dw==}
|
||||
peerDependencies:
|
||||
'@rrweb/types': 2.0.0-alpha.17
|
||||
rrweb-snapshot: 2.0.0-alpha.17
|
||||
@ -21599,7 +21599,7 @@ snapshots:
|
||||
dependencies:
|
||||
xtend: 4.0.2
|
||||
|
||||
posthog-js@1.234.9:
|
||||
posthog-js@1.235.4:
|
||||
dependencies:
|
||||
core-js: 3.41.0
|
||||
fflate: 0.4.8
|
||||
|
||||
Loading…
Reference in New Issue
Block a user