Add Sentry redux integration

This commit is contained in:
Tyler Hallada 2022-08-29 23:47:15 -04:00
parent 4c79640850
commit 098e3f3ce5
3 changed files with 6 additions and 0 deletions

View File

@ -1,14 +1,18 @@
import LogRocket from "logrocket" import LogRocket from "logrocket"
import * as Sentry from "@sentry/react";
import { configureStore, ThunkAction, Action } from "@reduxjs/toolkit" import { configureStore, ThunkAction, Action } from "@reduxjs/toolkit"
import pluginsReducer from "../slices/plugins" import pluginsReducer from "../slices/plugins"
import pluginsTxtReducer from "../slices/pluginsTxt" import pluginsTxtReducer from "../slices/pluginsTxt"
import modListFiltersReducer from "../slices/modListFilters" import modListFiltersReducer from "../slices/modListFilters"
const sentryReduxEnhancer = Sentry.createReduxEnhancer();
export function makeStore() { export function makeStore() {
return configureStore({ return configureStore({
reducer: { pluginsTxt: pluginsTxtReducer, plugins: pluginsReducer, modListFilters: modListFiltersReducer }, reducer: { pluginsTxt: pluginsTxtReducer, plugins: pluginsReducer, modListFilters: modListFiltersReducer },
middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }).concat(LogRocket.reduxMiddleware()), middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false }).concat(LogRocket.reduxMiddleware()),
enhancers: [sentryReduxEnhancer],
}) })
} }

1
package-lock.json generated
View File

@ -8,6 +8,7 @@
"dependencies": { "dependencies": {
"@reduxjs/toolkit": "^1.8.5", "@reduxjs/toolkit": "^1.8.5",
"@sentry/nextjs": "^7.11.1", "@sentry/nextjs": "^7.11.1",
"@sentry/react": "^7.11.1",
"@types/javascript-color-gradient": "^1.3.0", "@types/javascript-color-gradient": "^1.3.0",
"@types/mapbox-gl": "^2.6.0", "@types/mapbox-gl": "^2.6.0",
"babel-plugin-add-react-displayname": "^0.0.5", "babel-plugin-add-react-displayname": "^0.0.5",

View File

@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"@reduxjs/toolkit": "^1.8.5", "@reduxjs/toolkit": "^1.8.5",
"@sentry/nextjs": "^7.11.1", "@sentry/nextjs": "^7.11.1",
"@sentry/react": "^7.11.1",
"@types/javascript-color-gradient": "^1.3.0", "@types/javascript-color-gradient": "^1.3.0",
"@types/mapbox-gl": "^2.6.0", "@types/mapbox-gl": "^2.6.0",
"babel-plugin-add-react-displayname": "^0.0.5", "babel-plugin-add-react-displayname": "^0.0.5",