mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 03:26:47 +08:00
feat(core): add globalcontext info to mixpanel track (#7681)
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
} from '@affine/core/commands';
|
||||
import { mixpanel } from '@affine/core/mixpanel';
|
||||
import { CompatibleFavoriteItemsAdapter } from '@affine/core/modules/properties';
|
||||
import { TelemetryWorkspaceContextService } from '@affine/core/modules/telemetry/services/telemetry';
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
import { EdgelessIcon, HistoryIcon, PageIcon } from '@blocksuite/icons/rc';
|
||||
@@ -64,8 +63,6 @@ export function useRegisterBlocksuiteEditorCommands() {
|
||||
[docId, setTrashModal]
|
||||
);
|
||||
|
||||
const telemetry = useService(TelemetryWorkspaceContextService);
|
||||
|
||||
const isCloudWorkspace = workspace.flavour === WorkspaceFlavour.AFFINE_CLOUD;
|
||||
|
||||
useEffect(() => {
|
||||
@@ -168,7 +165,6 @@ export function useRegisterBlocksuiteEditorCommands() {
|
||||
control: 'cmdk',
|
||||
type: 'doc duplicate',
|
||||
category: 'doc',
|
||||
page: telemetry.getPageContext(),
|
||||
});
|
||||
},
|
||||
})
|
||||
@@ -299,7 +295,6 @@ export function useRegisterBlocksuiteEditorCommands() {
|
||||
favAdapter,
|
||||
docId,
|
||||
doc,
|
||||
telemetry,
|
||||
openInfoModal,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ function defaultNavigate(to: To, option?: { replace?: boolean }) {
|
||||
}
|
||||
|
||||
// TODO(@eyhn): add a name -> path helper in the results
|
||||
/**
|
||||
* @deprecated use `WorkbenchService` instead
|
||||
*/
|
||||
export function useNavigateHelper() {
|
||||
const navigate = useContext(NavigateContext) ?? defaultNavigate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user