added sentry

This commit is contained in:
SrGooglo 2023-09-20 10:25:05 +00:00
parent 7c26aba3a6
commit 46faf243c7
2 changed files with 14 additions and 1 deletions

View File

@ -45,6 +45,7 @@
"@mui/material": "^5.11.9", "@mui/material": "^5.11.9",
"@ragestudio/cordova-nfc": "^1.2.0", "@ragestudio/cordova-nfc": "^1.2.0",
"@react-spring/web": "^9.7.2", "@react-spring/web": "^9.7.2",
"@sentry/browser": "^7.64.0",
"@tanstack/react-virtual": "^3.0.0-beta.54", "@tanstack/react-virtual": "^3.0.0-beta.54",
"@tsmx/human-readable": "^1.0.7", "@tsmx/human-readable": "^1.0.7",
"antd": "^5.6.4", "antd": "^5.6.4",
@ -174,4 +175,4 @@
] ]
} }
} }
} }

View File

@ -91,6 +91,8 @@ import { ThemeProvider } from "cores/style/style.core.jsx"
import Layout from "./layout" import Layout from "./layout"
import * as Router from "./router" import * as Router from "./router"
import * as Sentry from "@sentry/browser"
import "theme/index.less" import "theme/index.less"
CapacitorUpdater.notifyAppReady() CapacitorUpdater.notifyAppReady()
@ -140,6 +142,16 @@ class ComtyApp extends React.Component {
// append var to #root // append var to #root
document.getElementById("root").classList.add("electron") document.getElementById("root").classList.add("electron")
} }
console.log(import.meta.env)
if (import.meta.env.VITE_SENTRY_DSN) {
console.log(`Initializing Sentry...`)
Sentry.init({
dsn: import.meta.env.VITE_SENTRY_DSN
})
}
} }
static publicEvents = { static publicEvents = {