Открыть боковую панель
Teknokomo
universo-react
Коммиты
d76a635b
Не подтверждена
Коммит
d76a635b
создал
Май 07, 2024
по автору
Brooooooklyn
Просмотр файлов
chore(core): handle the telemetry warnings in console (#6793)
владелец
6cd0c7cd
Изменения
4
Скрыть пробелы
Построчно
Рядом
packages/frontend/core/src/modules/telemetry/services/telemetry.ts
Просмотр файла @
d76a635b
...
...
@@ -15,6 +15,12 @@ export class TelemetryService extends Service {
}
onApplicationStart
()
{
if
(
process
.
env
.
MIXPANEL_TOKEN
)
{
mixpanel
.
init
(
process
.
env
.
MIXPANEL_TOKEN
||
''
,
{
track_pageview
:
true
,
persistence
:
'
localStorage
'
,
});
}
const
account
=
this
.
auth
.
session
.
account$
.
value
;
if
(
account
)
{
mixpanel
.
identify
(
account
.
id
);
...
...
packages/frontend/core/src/telemetry.tsx
Просмотр файла @
d76a635b
...
...
@@ -6,14 +6,8 @@ import { useLayoutEffect } from 'react';
export
function
Telemetry
()
{
const
settings
=
useAtomValue
(
appSettingAtom
);
useLayoutEffect
(()
=>
{
if
(
process
.
env
.
MIXPANEL_TOKEN
)
{
mixpanel
.
init
(
process
.
env
.
MIXPANEL_TOKEN
||
''
,
{
track_pageview
:
true
,
persistence
:
'
localStorage
'
,
});
if
(
settings
.
enableTelemetry
===
false
)
{
mixpanel
.
opt_out_tracking
();
}
if
(
settings
.
enableTelemetry
===
false
)
{
mixpanel
.
opt_out_tracking
();
}
},
[
settings
.
enableTelemetry
]);
return
null
;
...
...
packages/frontend/electron/renderer/index.tsx
Просмотр файла @
d76a635b
...
...
@@ -4,7 +4,7 @@ import '@affine/core/bootstrap/preload';
import
{
appConfigProxy
}
from
'
@affine/core/hooks/use-app-config-storage
'
;
import
{
performanceLogger
}
from
'
@affine/core/shared
'
;
import
{
apis
,
events
}
from
'
@affine/electron-api
'
;
import
{
init
,
replayIntegration
,
setTags
}
from
'
@sentry/electron/renderer
'
;
import
{
init
,
setTags
}
from
'
@sentry/electron/renderer
'
;
import
{
init
as
reactInit
,
reactRouterV6BrowserTracingIntegration
,
...
...
@@ -50,7 +50,6 @@ function main() {
createRoutesFromChildren
,
matchRoutes
,
}),
replayIntegration
(),
],
},
reactInit
...
...
packages/frontend/web/src/index.tsx
Просмотр файла @
d76a635b
...
...
@@ -8,7 +8,6 @@ import { isDesktop } from '@affine/env/constant';
import
{
init
,
reactRouterV6BrowserTracingIntegration
,
replayIntegration
,
setTags
,
}
from
'
@sentry/react
'
;
import
{
StrictMode
,
useEffect
}
from
'
react
'
;
...
...
@@ -44,7 +43,6 @@ function main() {
createRoutesFromChildren
,
matchRoutes
,
}),
replayIntegration
(),
],
});
setTags
({
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать