Add logrocket integrations
This commit is contained in:
parent
28c50a56f1
commit
5f196b0651
4
.babelrc
Normal file
4
.babelrc
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"presets": ["next/babel"],
|
||||
"plugins": ["add-react-displayname"]
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
import { configureStore, ThunkAction, Action } from "@reduxjs/toolkit"
|
||||
import LogRocket from "logrocket"
|
||||
import { applyMiddleware, configureStore, ThunkAction, Action } from "@reduxjs/toolkit"
|
||||
|
||||
import pluginsReducer from "../slices/plugins"
|
||||
import pluginsTxtReducer from "../slices/pluginsTxt"
|
||||
@ -7,7 +8,7 @@ import modListFiltersReducer from "../slices/modListFilters"
|
||||
export function makeStore() {
|
||||
return configureStore({
|
||||
reducer: { pluginsTxt: pluginsTxtReducer, plugins: pluginsReducer, modListFilters: modListFiltersReducer },
|
||||
middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }),
|
||||
middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }).concat(LogRocket.reduxMiddleware()),
|
||||
})
|
||||
}
|
||||
|
||||
|
61
package-lock.json
generated
61
package-lock.json
generated
@ -10,11 +10,13 @@
|
||||
"@sentry/nextjs": "^7.11.1",
|
||||
"@types/javascript-color-gradient": "^1.3.0",
|
||||
"@types/mapbox-gl": "^2.6.0",
|
||||
"babel-plugin-add-react-displayname": "^0.0.5",
|
||||
"date-fns": "^2.28.0",
|
||||
"downshift": "^6.1.7",
|
||||
"javascript-color-gradient": "^1.3.2",
|
||||
"js-cookie": "^3.0.1",
|
||||
"logrocket": "^3.0.1",
|
||||
"logrocket-react": "^5.0.1",
|
||||
"mapbox-gl": "^2.6.1",
|
||||
"minisearch": "^5.0.0",
|
||||
"next": "12.2.5",
|
||||
@ -27,6 +29,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"@types/logrocket-react": "^3.0.0",
|
||||
"@types/node": "17.0.8",
|
||||
"@types/react": "17.0.38",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
@ -2421,6 +2424,21 @@
|
||||
"integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/logrocket-react": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/logrocket-react/-/logrocket-react-3.0.0.tgz",
|
||||
"integrity": "sha512-bQ7LUwqwt2RNpRoco3vt8QBHy78nOQFF+KfFRol1PgKq8S1nIiLYA6Y0ZUAzqGw1viA0lyjAHlPQeTI+wl4wnw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"logrocket": "1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/logrocket-react/node_modules/logrocket": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/logrocket/-/logrocket-1.0.1.tgz",
|
||||
"integrity": "sha512-oPA0c5GzMKsWp/6p19OaujZQMzttluqVOI+989uHeciPAljPZvGEpZRbNO3Rr+jC/8jVLJdlMP9IHuyhKsASGA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/mapbox-gl": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/mapbox-gl/-/mapbox-gl-2.6.0.tgz",
|
||||
@ -2865,6 +2883,11 @@
|
||||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/babel-plugin-add-react-displayname": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-add-react-displayname/-/babel-plugin-add-react-displayname-0.0.5.tgz",
|
||||
"integrity": "sha512-LY3+Y0XVDYcShHHorshrDbt4KFWL4bSeniCtl4SYZbask+Syngk1uMPCeN9+nSiZo6zX5s0RTq/J9Pnaaf/KHw=="
|
||||
},
|
||||
"node_modules/babel-plugin-dynamic-import-node": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
|
||||
@ -5507,6 +5530,16 @@
|
||||
"resolved": "https://registry.npmjs.org/logrocket/-/logrocket-3.0.1.tgz",
|
||||
"integrity": "sha512-jOWG+jEzobKVxGytzZ+4KGm2kiMQMRTHab2uDWQyVZcHfEF38BlCH1yjQVY4LCmuQUwZitP9biMzJZnyUQ0dtQ=="
|
||||
},
|
||||
"node_modules/logrocket-react": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/logrocket-react/-/logrocket-react-5.0.1.tgz",
|
||||
"integrity": "sha512-d5RAi1giur9Yv7/lDK/c2S1hviopN5K1XMMpfpSFRDG3Rr/j5RmGuvNHdXNTJUwGuxTVrpnKUOB43ceQMJfO1Q==",
|
||||
"peerDependencies": {
|
||||
"logrocket": ">=2.0",
|
||||
"react": ">=17.0",
|
||||
"react-dom": ">=17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
@ -9484,6 +9517,23 @@
|
||||
"integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=",
|
||||
"dev": true
|
||||
},
|
||||
"@types/logrocket-react": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/logrocket-react/-/logrocket-react-3.0.0.tgz",
|
||||
"integrity": "sha512-bQ7LUwqwt2RNpRoco3vt8QBHy78nOQFF+KfFRol1PgKq8S1nIiLYA6Y0ZUAzqGw1viA0lyjAHlPQeTI+wl4wnw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"logrocket": "1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"logrocket": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/logrocket/-/logrocket-1.0.1.tgz",
|
||||
"integrity": "sha512-oPA0c5GzMKsWp/6p19OaujZQMzttluqVOI+989uHeciPAljPZvGEpZRbNO3Rr+jC/8jVLJdlMP9IHuyhKsASGA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/mapbox-gl": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/mapbox-gl/-/mapbox-gl-2.6.0.tgz",
|
||||
@ -9801,6 +9851,11 @@
|
||||
"integrity": "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==",
|
||||
"requires": {}
|
||||
},
|
||||
"babel-plugin-add-react-displayname": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-add-react-displayname/-/babel-plugin-add-react-displayname-0.0.5.tgz",
|
||||
"integrity": "sha512-LY3+Y0XVDYcShHHorshrDbt4KFWL4bSeniCtl4SYZbask+Syngk1uMPCeN9+nSiZo6zX5s0RTq/J9Pnaaf/KHw=="
|
||||
},
|
||||
"babel-plugin-dynamic-import-node": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
|
||||
@ -11806,6 +11861,12 @@
|
||||
"resolved": "https://registry.npmjs.org/logrocket/-/logrocket-3.0.1.tgz",
|
||||
"integrity": "sha512-jOWG+jEzobKVxGytzZ+4KGm2kiMQMRTHab2uDWQyVZcHfEF38BlCH1yjQVY4LCmuQUwZitP9biMzJZnyUQ0dtQ=="
|
||||
},
|
||||
"logrocket-react": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/logrocket-react/-/logrocket-react-5.0.1.tgz",
|
||||
"integrity": "sha512-d5RAi1giur9Yv7/lDK/c2S1hviopN5K1XMMpfpSFRDG3Rr/j5RmGuvNHdXNTJUwGuxTVrpnKUOB43ceQMJfO1Q==",
|
||||
"requires": {}
|
||||
},
|
||||
"loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
|
@ -13,11 +13,13 @@
|
||||
"@sentry/nextjs": "^7.11.1",
|
||||
"@types/javascript-color-gradient": "^1.3.0",
|
||||
"@types/mapbox-gl": "^2.6.0",
|
||||
"babel-plugin-add-react-displayname": "^0.0.5",
|
||||
"date-fns": "^2.28.0",
|
||||
"downshift": "^6.1.7",
|
||||
"javascript-color-gradient": "^1.3.2",
|
||||
"js-cookie": "^3.0.1",
|
||||
"logrocket": "^3.0.1",
|
||||
"logrocket-react": "^5.0.1",
|
||||
"mapbox-gl": "^2.6.1",
|
||||
"minisearch": "^5.0.0",
|
||||
"next": "12.2.5",
|
||||
@ -30,6 +32,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"@types/logrocket-react": "^3.0.0",
|
||||
"@types/node": "17.0.8",
|
||||
"@types/react": "17.0.38",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
|
@ -1,12 +1,21 @@
|
||||
import "../styles/globals.css";
|
||||
|
||||
import * as Sentry from "@sentry/nextjs";
|
||||
import { Provider } from "react-redux";
|
||||
import type { AppProps } from "next/app";
|
||||
import LogRocket from "logrocket";
|
||||
import setupLogRocketReact from "logrocket-react";
|
||||
|
||||
import store from "../lib/store";
|
||||
|
||||
LogRocket.init("0tlgj3/modmapper");
|
||||
if (typeof window !== "undefined") setupLogRocketReact(LogRocket);
|
||||
|
||||
LogRocket.getSessionURL((sessionURL) => {
|
||||
Sentry.configureScope((scope) => {
|
||||
scope.setExtra("sessionURL", sessionURL);
|
||||
});
|
||||
});
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user