feat: disable sentry if telemetry is off

This commit is contained in:
Andrew Bastin
2021-12-16 18:02:01 +05:30
parent 29b5913fac
commit 1a1baa715d
5 changed files with 31 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
import { useContext } from "@nuxtjs/composition-api"
import * as Sentry from "@sentry/browser"
export function useSentry() {
// TODO: Make Sentry load lazy at some point ? (see nuxt/sentry)
const { $sentry } = useContext()
return $sentry as any as typeof Sentry
}