chore: remove analytic

This commit is contained in:
Faisal Amir 2024-11-22 12:59:34 +07:00 committed by Louis
parent 97ad9e726a
commit 813357cff6
4 changed files with 4 additions and 25 deletions

View File

@ -36,7 +36,6 @@
"path": "^0.12.7",
"plop": "^4.0.1",
"plop-helper-date": "^1.0.0",
"posthog-js": "^1.186.3",
"react": "^18",
"react-dom": "^18",
"react-hook-form": "^7.51.1",

View File

@ -4,8 +4,6 @@ import { Metadata } from 'next'
import '@/styles/main.scss'
import { CSPostHogProvider } from './posthog'
export const metadata: Metadata = {
title: 'Jan',
description:
@ -15,12 +13,10 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: PropsWithChildren) {
return (
<html lang="en" suppressHydrationWarning>
<CSPostHogProvider>
<body className="h-screen font-sans text-sm antialiased">
<div className="dragable-bar" />
{children}
</body>
</CSPostHogProvider>
<body className="h-screen font-sans text-sm antialiased">
<div className="dragable-bar" />
{children}
</body>
</html>
)
}

View File

@ -1,15 +0,0 @@
'use client'
import posthog from 'posthog-js'
import { PostHogProvider } from 'posthog-js/react'
if (typeof window !== 'undefined') {
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, {
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
person_profiles: 'always',
persistence: 'localStorage',
})
}
export function CSPostHogProvider({ children }) {
return <PostHogProvider client={posthog}>{children}</PostHogProvider>
}

View File

@ -29,7 +29,6 @@
"next-themes": "^0.2.1",
"postcss": "8.4.31",
"postcss-url": "10.1.3",
"posthog-js": "^1.95.1",
"react": "18.2.0",
"react-circular-progressbar": "^2.1.0",
"react-dom": "18.2.0",