refactor: organize desktop vs. mobile into separate folders

This commit is contained in:
Arjun Patel
2026-04-29 08:42:56 -07:00
parent 3d9fe67936
commit 3a11a82cd3
194 changed files with 213 additions and 213 deletions
+29
View File
@@ -0,0 +1,29 @@
import * as Sentry from "@sentry/electron/renderer";
import { appConfig, appEnv } from "@/config/env";
import { installErrorSinks } from "@/lib/errors";
/**
* Initialise Sentry for a renderer process. No-ops when `sentryDsn` is empty
* so dev builds and unconfigured envs stay quiet.
*/
export function initSentryRenderer(): void {
if (!appConfig.sentryDsn) return;
Sentry.init({
dsn: appConfig.sentryDsn,
environment: appEnv,
tracesSampleRate: 0,
});
installErrorSinks({
capture: (err, context) =>
Sentry.captureException(err, { extra: context }),
breadcrumb: (err, context) =>
Sentry.addBreadcrumb({
category: "error",
level: "error",
message: err instanceof Error ? err.message : String(err),
data: context,
}),
});
}