fix(core): mixpanel error when opt-out (#6861)

This commit is contained in:
EYHN
2024-05-10 03:58:44 +00:00
parent 203459679c
commit f5dceda0cc

View File

@@ -1,8 +1,9 @@
import { appSettingAtom } from '@toeverything/infra'; import { appSettingAtom } from '@toeverything/infra';
import { useAtomValue } from 'jotai/react'; import { useAtomValue } from 'jotai/react';
import mixpanel from 'mixpanel-browser';
import { useLayoutEffect } from 'react'; import { useLayoutEffect } from 'react';
import { mixpanel } from './utils';
export function Telemetry() { export function Telemetry() {
const settings = useAtomValue(appSettingAtom); const settings = useAtomValue(appSettingAtom);
useLayoutEffect(() => { useLayoutEffect(() => {