Skip to content

Commit

Permalink
feat: Removed openreplay
Browse files Browse the repository at this point in the history
  • Loading branch information
chavda-bhavik committed Jul 16, 2024
1 parent b74c819 commit 9396b5b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 63 deletions.
1 change: 0 additions & 1 deletion apps/web/.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
41 changes: 2 additions & 39 deletions apps/web/components/common/Support.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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<any>();

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 ? (
Expand Down
1 change: 0 additions & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion apps/web/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 0 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9396b5b

Please sign in to comment.