added sentry

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

View File

@ -45,6 +45,7 @@
"@mui/material": "^5.11.9",
"@ragestudio/cordova-nfc": "^1.2.0",
"@react-spring/web": "^9.7.2",
"@sentry/browser": "^7.64.0",
"@tanstack/react-virtual": "^3.0.0-beta.54",
"@tsmx/human-readable": "^1.0.7",
"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 * as Router from "./router"
import * as Sentry from "@sentry/browser"
import "theme/index.less"
CapacitorUpdater.notifyAppReady()
@ -140,6 +142,16 @@ class ComtyApp extends React.Component {
// append var to #root
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 = {