mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-10 17:33:24 +01:00
Add event for edition actions
This commit is contained in:
parent
ff639aab4f
commit
af33474a1c
@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import RenameDialog from './rename-dialog';
|
||||
import DeleteDialog from './delete-dialog';
|
||||
import { ActionType } from '../action-chooser';
|
||||
@ -13,6 +13,8 @@ import DeleteMultiselectDialog from './delete-multiselect-dialog';
|
||||
import ExportDialog from './export-dialog';
|
||||
import ShareDialog from './share-dialog';
|
||||
import LabelDialog from './label-dialog';
|
||||
import ReactGA from 'react-ga4';
|
||||
|
||||
|
||||
export type BasicMapInfo = {
|
||||
name: string;
|
||||
@ -27,6 +29,16 @@ type ActionDialogProps = {
|
||||
};
|
||||
|
||||
const ActionDispatcher = ({ mapsId, action, onClose, fromEditor }: ActionDialogProps): React.ReactElement => {
|
||||
|
||||
useEffect(() => {
|
||||
ReactGA.event({
|
||||
category: 'map metadata',
|
||||
action: action,
|
||||
nonInteraction: true
|
||||
|
||||
});
|
||||
}, [action]);
|
||||
|
||||
const handleOnClose = (success?: boolean): void => {
|
||||
onClose(success);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user