mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-02 09:59:55 +08:00
fix(core): event flow handle (#14256)
This commit is contained in:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user