mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 19:16:29 +08:00
chore: populate page prop for mixpanel (#7425)
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
registerAffineCommand,
|
||||
} from '@affine/core/commands';
|
||||
import { FavoriteItemsAdapter } from '@affine/core/modules/properties';
|
||||
import { TelemetryWorkspaceContextService } from '@affine/core/modules/telemetry/services/telemetry';
|
||||
import { mixpanel } from '@affine/core/utils';
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import { useI18n } from '@affine/i18n';
|
||||
@@ -58,6 +59,8 @@ export function useRegisterBlocksuiteEditorCommands() {
|
||||
[docId, setTrashModal]
|
||||
);
|
||||
|
||||
const telemetry = useService(TelemetryWorkspaceContextService);
|
||||
|
||||
const isCloudWorkspace = workspace.flavour === WorkspaceFlavour.AFFINE_CLOUD;
|
||||
|
||||
useEffect(() => {
|
||||
@@ -144,6 +147,7 @@ export function useRegisterBlocksuiteEditorCommands() {
|
||||
control: 'cmdk',
|
||||
type: 'doc duplicate',
|
||||
category: 'doc',
|
||||
page: telemetry.getPageContext(),
|
||||
});
|
||||
},
|
||||
})
|
||||
@@ -275,5 +279,6 @@ export function useRegisterBlocksuiteEditorCommands() {
|
||||
favAdapter,
|
||||
docId,
|
||||
doc,
|
||||
telemetry,
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user