trackEvent in ErrorBoundary, disable trackEvent in dev

This commit is contained in:
Martti Malmi
2024-01-09 15:16:47 +02:00
parent 376096c5af
commit 7073e8d9dd
3 changed files with 21 additions and 16 deletions

View File

@ -538,7 +538,7 @@ export function trackEvent(
props?: Record<string, string | boolean>,
e?: { destination?: { url: string } },
) {
if (CONFIG.features.analytics && (LoginStore.snapshot().appData.item.preferences.telemetry ?? true)) {
if (!import.meta.env.DEV && CONFIG.features.analytics && (LoginStore.snapshot().appData.item.preferences.telemetry ?? true)) {
fetch("https://analytics.v0l.io/api/event", {
method: "POST",
headers: {