fix(core): event flow handle (#14256)

This commit is contained in:
DarkSky
2026-01-15 00:04:32 +08:00
committed by GitHub
parent 7c24b2521a
commit 13907f7234
18 changed files with 389 additions and 30 deletions
@@ -1,4 +1,4 @@
import { enableAutoTrack, mixpanel, sentry } from '@affine/track';
import { enableAutoTrack, sentry, tracker } from '@affine/track';
import { appSettingAtom } from '@toeverything/infra';
import { useAtomValue } from 'jotai/react';
import { useEffect } from 'react';
@@ -9,12 +9,12 @@ export function Telemetry() {
useEffect(() => {
if (settings.enableTelemetry === false) {
sentry.disable();
mixpanel.opt_out_tracking();
tracker.opt_out_tracking();
return;
} else {
sentry.enable();
mixpanel.opt_in_tracking();
return enableAutoTrack(document.body, mixpanel.track);
tracker.opt_in_tracking();
return enableAutoTrack(document.body, tracker.track);
}
}, [settings.enableTelemetry]);