Added support chat and sentry ignore messages.

This commit is contained in:
Patrick Fic
2023-10-13 11:29:18 -07:00
parent fc89c4429d
commit fd989bf7e4
9 changed files with 57 additions and 9 deletions

View File

@@ -17,6 +17,11 @@ Sentry.init({
tracesSampleRate: 1.0,
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", "https://db.rps.imex.online"],
ignoreErrors: [
"SimpleURLLoaderWrapper",
"Cannot read properties of null (reading 'webContents')",
"EBUSY: resource busy or locked",
],
});
//if (process.env.NODE_ENV === "production") LogRocket.init("imex/rps");
const container = document.getElementById("root");

View File

@@ -29,6 +29,7 @@ import {
updateUserDetailsSuccess,
} from "./user.actions";
import UserActionTypes from "./user.types";
import * as Sentry from "@sentry/electron";
const { ipcRenderer } = window;
@@ -153,6 +154,23 @@ export function* signInSuccessSaga({ payload }) {
});
yield put(checkForNotification());
//Check for notifications, and continue to check.
window.$crisp.push([
"set",
"user:company",
[shop.data.bodyshops[0].shopname],
]);
window.$crisp.push([
"set",
"user:nickname",
[payload.displayName || payload.email],
]);
window.$crisp.push(["set", "session:segments", [["rps-user"]]]);
Sentry.setUser({
email: payload.email,
username: payload.displayName || payload.email,
});
} else {
console.log("No bodyshop has been associated.");
yield put(setBodyshop(false));