add posthog (#440)

This commit is contained in:
Salih Altun
2024-06-07 11:19:36 +03:00
committed by GitHub
parent 579aa274cd
commit 81538a74e1
3 changed files with 41 additions and 21 deletions

View File

@@ -31,10 +31,10 @@
"express": "^4.19.2",
"fetch-to-curl": "^0.6.0",
"open": "^10.1.0",
"posthog-js": "^1.138.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.1",
"react-medium-image-zoom": "^5.1.11",
"react-router-dom": "^6.22.3",
"serve-handler": "^6.1.5",
"tailwind-merge": "^2.2.2",
@@ -3544,6 +3544,11 @@
"resolved": "https://registry.npmjs.org/fetch-to-curl/-/fetch-to-curl-0.6.0.tgz",
"integrity": "sha512-Gsn0baHnENueQrtvKGikEkaAJhfQYDbSFnyZvI/qnwiZtdIwiuK6iJ0BAKzS3bEzpWyUr6SV9uB4H3HUwl/yZA=="
},
"node_modules/fflate": {
"version": "0.4.8",
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz",
"integrity": "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="
},
"node_modules/file-entry-cache": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -5082,6 +5087,24 @@
"resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
},
"node_modules/posthog-js": {
"version": "1.138.0",
"resolved": "https://registry.npmjs.org/posthog-js/-/posthog-js-1.138.0.tgz",
"integrity": "sha512-Pmvt5KmYPT3Je0auBq3Q3YSvHkPHUiW8Iy1UwS8mN/bQS19u8ls1UoMe6yiGijvnvHYmORjkMu6RYbmlTiKFZg==",
"dependencies": {
"fflate": "^0.4.8",
"preact": "^10.19.3"
}
},
"node_modules/preact": {
"version": "10.22.0",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.22.0.tgz",
"integrity": "sha512-RRurnSjJPj4rp5K6XoP45Ui33ncb7e4H7WiOHVpjbkvqvA3U+N8Z6Qbo0AE6leGYBV66n8EhEaFixvIu3SkxFw==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
}
},
"node_modules/prelude-ls": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
@@ -5237,21 +5260,6 @@
"react": "^16.8.0 || ^17 || ^18"
}
},
"node_modules/react-medium-image-zoom": {
"version": "5.1.11",
"resolved": "https://registry.npmjs.org/react-medium-image-zoom/-/react-medium-image-zoom-5.1.11.tgz",
"integrity": "sha512-7rHECk0nRY+Uwmd02HKPt0L0Lxv2/km24ztcxgUaGR8TD0ikK+OOJyGZAMg/SeQzJDzmNv0yW6U1K8jqnta5MQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/rpearce"
}
],
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/react-remove-scroll": {
"version": "2.5.5",
"resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz",

View File

@@ -39,6 +39,7 @@
"express": "^4.19.2",
"fetch-to-curl": "^0.6.0",
"open": "^10.1.0",
"posthog-js": "^1.138.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.51.1",

View File

@@ -4,13 +4,24 @@ import { router } from "./router";
import { QueryClientProvider } from "@tanstack/react-query";
import { queryClient } from "./api/QueryClient";
import { PostHogProvider } from "posthog-js/react";
const postHogOptions = {
api_host: "https://app.posthog.com",
};
function App() {
return (
<QueryClientProvider client={queryClient}>
<ThemeProvider defaultTheme="dark">
<RouterProvider router={router} />
</ThemeProvider>
</QueryClientProvider>
<PostHogProvider
apiKey="phc_bVT2ugnZhMHRWqMvSRHPdeTjaPxQqT3QSsI3r5FlQR5"
options={postHogOptions}
>
<QueryClientProvider client={queryClient}>
<ThemeProvider defaultTheme="dark">
<RouterProvider router={router} />
</ThemeProvider>
</QueryClientProvider>
</PostHogProvider>
);
}