Skip to content

Commit

Permalink
remove posthog
Browse files Browse the repository at this point in the history
  • Loading branch information
hotlong committed Sep 11, 2024
1 parent 0f080b3 commit 59b8fe0
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 63 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
"next-seo": "^4.26.0",
"next-sitemap": "^2.5.20",
"next-transpile-modules": "^8.0.0",
"next-use-posthog": "^1.16.0",
"node-loader": "^2.0.0",
"photoswipe": "^4.1.3",
"pnpapi": "^0.0.0",
Expand Down
19 changes: 2 additions & 17 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,23 +225,8 @@ export function Header({ hasNav = false, navIsOpen, onNavToggle, title, section
console.log(userInfo);
}, [authenticated, userInfo]);

// const { data: session } = useSession()


// useEffect(() => {
// if (session) {
// const userId = session.user.email;
// const people = {
// id: userId,
// name: 'steedos.com/' + session.user.name,
// spaceId: 'steedos.com',
// spaceName: 'steedos.com',
// }
// window.posthog.identify(userId);
// window.posthog.people.set(people);
// }
// }, [session]);




useEffect(() => {
let offset = 50
Expand Down
14 changes: 0 additions & 14 deletions src/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import 'intersection-observer'
import {has, isArray} from 'lodash';
import { SearchProvider } from '@/components/Search'
// import { SessionProvider } from "next-auth/react"
import { usePostHog } from 'next-use-posthog'
// import { getSite } from '@/lib/site';

if (typeof window !== 'undefined' && !('ResizeObserver' in window)) {
Expand Down Expand Up @@ -48,19 +47,6 @@ export default function App({
router
}) {

usePostHog('phc_Hs5rJpeE5JK3GdR3NWOf75TvjEcnYShmBxNU2Y942HB', {
api_host: 'https://posthog.steedos.cn',
loaded: (posthog) => {
window.posthog = posthog;
window.posthog.group('space', 'steedos.com');
window.posthog.people.set({
spaceId: 'steedos.com',
spaceName: 'steedos.com',
});
posthog.opt_in_capturing()
},
})

let [navIsOpen, setNavIsOpen] = useState(false)

useEffect(() => {
Expand Down
31 changes: 0 additions & 31 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2665,11 +2665,6 @@
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.0.6.tgz#023d72a5c4531b4ce204528971700a78a85a0c50"
integrity sha512-Myxw//kzromB9yWgS8qYGuGVf91oBUUJpNvy5eM50sqvmKLbKjwLxohJnkWGTeeI9v9IBMtPLxz5Gc60FIfvCA==

"@sentry/types@^6.11.0":
version "6.19.7"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.19.7.tgz#c6b337912e588083fc2896eb012526cf7cfec7c7"
integrity sha512-jH84pDYE+hHIbVnab3Hr+ZXr1v8QABfhx39KknxqKWr2l0oEItzepV0URvbEhB446lk/S/59230dlUUIBGsXbg==

"@serverless/[email protected]":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@serverless/aws-iam-role/-/aws-iam-role-1.0.0.tgz#bab4ee9dd82f3f05b875daa9bb4b27f28038dc51"
Expand Down Expand Up @@ -6396,11 +6391,6 @@ fault@^1.0.0:
dependencies:
format "^0.2.0"

fflate@^0.4.1:
version "0.4.8"
resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.4.8.tgz#f90b82aefbd8ac174213abb338bd7ef848f0f5ae"
integrity sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==

file-entry-cache@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027"
Expand Down Expand Up @@ -9402,13 +9392,6 @@ next-transpile-modules@^8.0.0:
enhanced-resolve "^5.7.0"
escalade "^3.1.1"

next-use-posthog@^1.16.0:
version "1.16.0"
resolved "https://registry.yarnpkg.com/next-use-posthog/-/next-use-posthog-1.16.0.tgz#19319435bf36f64aae43eb94c49da72cc659689e"
integrity sha512-nEv+0c/m06/uImJTZ8llg+Pr5thMOyGEjKzXZK31UqVf+/bhbsG4mDFP4yJyDC02+U3tb1c3wW/IN0XY7Kn9lw==
dependencies:
posthog-js "1.16.0"

[email protected]:
version "11.1.2"
resolved "https://registry.yarnpkg.com/next/-/next-11.1.2.tgz#527475787a9a362f1bc916962b0c0655cc05bc91"
Expand Down Expand Up @@ -10416,15 +10399,6 @@ postcss@^8.4.14:
picocolors "^1.0.0"
source-map-js "^1.0.2"

[email protected]:
version "1.16.0"
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.16.0.tgz#60c24151d42f147b8513ecd0d41c768dc7c374ec"
integrity sha512-7gE4fDSCD7wzdr+Jb/dOIqUubsc4ahnyJYXKudDF+LcuhGX8qP8wRj8WA6JtyQDS1mqSH3Y+AwOWzfC9W8UIMQ==
dependencies:
"@sentry/types" "^6.11.0"
fflate "^0.4.1"
rrweb-snapshot "^1.1.7"

preact-render-to-string@^5.1.19:
version "5.2.1"
resolved "https://registry.yarnpkg.com/preact-render-to-string/-/preact-render-to-string-5.2.1.tgz#71f3e8cda65f33dbc8ad8d904ff58e3f532e59f3"
Expand Down Expand Up @@ -11531,11 +11505,6 @@ rope-sequence@^1.3.0:
resolved "https://registry.yarnpkg.com/rope-sequence/-/rope-sequence-1.3.2.tgz#a19e02d72991ca71feb6b5f8a91154e48e3c098b"
integrity sha512-ku6MFrwEVSVmXLvy3dYph3LAMNS0890K7fabn+0YIRQ2T96T9F4gkFf0vf0WW0JUraNWwGRtInEpH7yO4tbQZg==

rrweb-snapshot@^1.1.7:
version "1.1.14"
resolved "https://registry.yarnpkg.com/rrweb-snapshot/-/rrweb-snapshot-1.1.14.tgz#9d4d9be54a28a893373428ee4393ec7e5bd83fcc"
integrity sha512-eP5pirNjP5+GewQfcOQY4uBiDnpqxNRc65yKPW0eSoU1XamDfc4M8oqpXGMyUyvLyxFDB0q0+DChuxxiU2FXBQ==

rtl-css-js@^1.14.0:
version "1.14.2"
resolved "https://registry.yarnpkg.com/rtl-css-js/-/rtl-css-js-1.14.2.tgz#fb2168433af9cdabee8a1613f4e2cbd1148acf6f"
Expand Down

0 comments on commit 59b8fe0

Please sign in to comment.