Try to fix logrocket

This commit is contained in:
Tyler Hallada 2022-08-29 22:51:12 -04:00
parent bbe2698f0b
commit 4c79640850
2 changed files with 10 additions and 8 deletions

8
lib/logrocketSetup.ts Normal file
View File

@ -0,0 +1,8 @@
import LogRocket from "logrocket";
import setupLogRocketReact from "logrocket-react";
const LOGROCKET_APP_ID =
process.env.LOGROCKET_APP_ID || process.env.NEXT_PUBLIC_LOGROCKET_APP_ID;
LogRocket.init(LOGROCKET_APP_ID || "0tlgj3/modmapper");
if (typeof window !== "undefined") setupLogRocketReact(LogRocket);

View File

@ -1,19 +1,13 @@
import "../lib/logrocketSetup";
import "../styles/globals.css"; import "../styles/globals.css";
import LogRocket from "logrocket";
import * as Sentry from "@sentry/nextjs"; import * as Sentry from "@sentry/nextjs";
import { Provider } from "react-redux"; import { Provider } from "react-redux";
import type { AppProps } from "next/app"; import type { AppProps } from "next/app";
import LogRocket from "logrocket";
import setupLogRocketReact from "logrocket-react";
import store from "../lib/store"; import store from "../lib/store";
const LOGROCKET_APP_ID =
process.env.LOGROCKET_APP_ID || process.env.NEXT_PUBLIC_LOGROCKET_APP_ID;
LogRocket.init(LOGROCKET_APP_ID || "0tlgj3/modmapper");
if (typeof window !== "undefined") setupLogRocketReact(LogRocket);
LogRocket.getSessionURL((sessionURL) => { LogRocket.getSessionURL((sessionURL) => {
Sentry.configureScope((scope) => { Sentry.configureScope((scope) => {
scope.setExtra("sessionURL", sessionURL); scope.setExtra("sessionURL", sessionURL);