From 9396b5b009d8a484aafd6b4bf14b7219d036d979 Mon Sep 17 00:00:00 2001 From: chavda-bhavik Date: Tue, 16 Jul 2024 20:53:43 +0530 Subject: [PATCH] feat: Removed openreplay --- apps/web/.example.env | 1 - apps/web/components/common/Support.tsx | 41 ++------------------------ apps/web/next.config.js | 1 - apps/web/package.json | 1 - apps/web/types/global.d.ts | 1 - pnpm-lock.yaml | 20 ------------- 6 files changed, 2 insertions(+), 63 deletions(-) diff --git a/apps/web/.example.env b/apps/web/.example.env index b9a4b2513..2688b59f6 100644 --- a/apps/web/.example.env +++ b/apps/web/.example.env @@ -3,7 +3,6 @@ NEXT_PUBLIC_EMBED_URL=http://localhost:4701/embed.umd.min.js NEXT_PUBLIC_AMPLITUDE_ID= NEXT_PUBLIC_TAWK_PROPERTY_ID= NEXT_PUBLIC_TAWK_WIDGET_ID= -NEXT_PUBLIC_OPENREPLAY_KEY= NEXT_PUBLIC_SENTRY_DSN= SENTRY_DSN= NODE_ENV=production \ No newline at end of file diff --git a/apps/web/components/common/Support.tsx b/apps/web/components/common/Support.tsx index 900f87dbc..cee18b59e 100644 --- a/apps/web/components/common/Support.tsx +++ b/apps/web/components/common/Support.tsx @@ -1,7 +1,6 @@ +import { useRef } from 'react'; import Script from 'next/script'; import getConfig from 'next/config'; -import Tracker from '@openreplay/tracker'; -import { useEffect, useRef } from 'react'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import TawkMessengerReact from '@tawk.to/tawk-messenger-react'; @@ -12,45 +11,9 @@ interface SupportProps { profile?: IProfileData; } -let tracker: Tracker; -if (publicRuntimeConfig.NEXT_PUBLIC_OPENREPLAY_KEY) { - tracker = new Tracker({ - __DISABLE_SECURE_MODE: true, - projectKey: publicRuntimeConfig.NEXT_PUBLIC_OPENREPLAY_KEY, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - network: { - failuresOnly: true, - ignoreHeaders: ['Cookie'], - captureInIframes: true, - capturePayload: true, - }, - }); -} - -export function Support({ profile }: SupportProps) { +export function Support({}: SupportProps) { const twakRef = useRef(); - useEffect(() => { - if (tracker) { - tracker.start(); - } - if (profile) { - if (tracker) { - tracker.setUserID(profile.email); - tracker.setMetadata('lastname', profile.lastName); - tracker.setMetadata('firstname', profile.firstName); - } - /* - * twakRef.current?.setAttributes({ - * id: profile._id, - * name: profile.firstName, - * email: profile.email, - * }); - */ - } - }, [profile]); - return ( <> {publicRuntimeConfig.NEXT_PUBLIC_TAWK_PROPERTY_ID && publicRuntimeConfig.NEXT_PUBLIC_TAWK_WIDGET_ID ? ( diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 29a0b1ad0..f31f2877e 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -11,7 +11,6 @@ const nextConfig = { NEXT_PUBLIC_TAWK_PROPERTY_ID: process.env.NEXT_PUBLIC_TAWK_PROPERTY_ID, NEXT_PUBLIC_TAWK_WIDGET_ID: process.env.NEXT_PUBLIC_TAWK_WIDGET_ID, NEXT_PUBLIC_GTM_ID: process.env.NEXT_PUBLIC_GTM_ID, - NEXT_PUBLIC_OPENREPLAY_KEY: process.env.NEXT_PUBLIC_OPENREPLAY_KEY, NEXT_PUBLIC_GOOGLE_ANALYTICS_ID: process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID, NEXT_PUBLIC_ONBOARDING_TOKEN: process.env.NEXT_PUBLIC_ONBOARDING_TOKEN, NEXT_PUBLIC_PAYMENT_GATEWAY_URL: process.env.NEXT_PUBLIC_PAYMENT_GATEWAY_URL, diff --git a/apps/web/package.json b/apps/web/package.json index 07a904b17..bfc6e452b 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -29,7 +29,6 @@ "@mantine/next": "6.0.21", "@mantine/notifications": "6.0.21", "@mantine/prism": "6.0.21", - "@openreplay/tracker": "^9.0.9", "@sentry/nextjs": "^7.112.2", "@stripe/react-stripe-js": "^2.7.1", "@stripe/stripe-js": "^3.4.0", diff --git a/apps/web/types/global.d.ts b/apps/web/types/global.d.ts index f726f621b..5a8affe2b 100644 --- a/apps/web/types/global.d.ts +++ b/apps/web/types/global.d.ts @@ -10,7 +10,6 @@ namespace NodeJS { NEXT_PUBLIC_AMPLITUDE_ID: string; NEXT_PUBLIC_TAWK_PROPERTY_ID: string; NEXT_PUBLIC_TAWK_WIDGET_ID: string; - NEXT_PUBLIC_OPENREPLAY_KEY: string; NEXT_PUBLIC_SENTRY_DSN: string; NEXT_PUBLIC_PAYMENT_GATEWAY_URL: string; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1907f260b..8e5a72797 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -447,9 +447,6 @@ importers: '@mantine/prism': specifier: 6.0.21 version: 6.0.21(@mantine/core@6.0.21)(@mantine/hooks@6.0.21)(react-dom@18.2.0)(react@18.2.0) - '@openreplay/tracker': - specifier: ^9.0.9 - version: 9.0.14 '@sentry/nextjs': specifier: ^7.112.2 version: 7.118.0(next@14.1.1)(react@18.2.0)(webpack@5.92.1) @@ -4608,10 +4605,6 @@ packages: /@mdx-js/util@1.6.22: resolution: {integrity: sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==} - /@medv/finder@3.2.0: - resolution: {integrity: sha512-JmU7JIBwyL8RAzefvzALT4sP2M0biGk8i2invAgpQmma/QgfsaqoHIvJ7S0YC8n9hUVG8X3Leul2nGa06PvhbQ==} - dev: false - /@mongodb-js/saslprep@1.1.7: resolution: {integrity: sha512-dCHW/oEX0KJ4NjDULBo3JiOaK5+6axtpBbS+ao2ZInoAL9/YRQLhXzSNAFz7hP4nzLkIqsfYAK/PDE3+XHny0Q==} dependencies: @@ -5752,15 +5745,6 @@ packages: '@octokit/openapi-types': 18.1.1 dev: true - /@openreplay/tracker@9.0.14: - resolution: {integrity: sha512-UqzJFrbaxL/MDiT5eeOzqhmW/cHuT95bSVhP3OXv6edC7vezF9D5rEAhKIK21LNrjibcZy9GEmCeM9z6YjisHA==} - engines: {node: '>=14.0'} - dependencies: - '@medv/finder': 3.2.0 - error-stack-parser: 2.1.4 - fflate: 0.7.4 - dev: false - /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -14103,10 +14087,6 @@ packages: /fetch-retry@5.0.6: resolution: {integrity: sha512-3yurQZ2hD9VISAhJJP9bpYFNQrHHBXE2JxxjY5aLEcDi46RmAzJE2OC9FAde0yis5ElW0jTTzs0zfg/Cca4XqQ==} - /fflate@0.7.4: - resolution: {integrity: sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw==} - dev: false - /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} deprecated: This module is no longer supported.