Fix eventPrefix for two column task list

This commit is contained in:
Lourens Schep 2022-04-25 10:44:29 -03:00
parent 542f7ef918
commit 1acbcd64c5
1 changed files with 4 additions and 2 deletions

View File

@ -46,12 +46,14 @@ export const TaskList: React.FC< TaskListProps > = ( {
query,
id,
eventName,
eventPrefix,
tasks,
twoColumns,
keepCompletedTaskList,
isComplete,
displayProgressHeader,
} ) => {
const listEventPrefix = eventName ? eventName + '_' : eventPrefix;
const { createNotice } = useDispatch( 'core/notices' );
const { updateOptions, dismissTask, undoDismissTask } = useDispatch(
OPTIONS_STORE_NAME
@ -80,7 +82,7 @@ export const TaskList: React.FC< TaskListProps > = ( {
return;
}
recordEvent( `${ eventName }_view`, {
recordEvent( `${ listEventPrefix }view`, {
number_tasks: visibleTasks.length,
store_connected: profileItems.wccom_connected,
} );
@ -199,7 +201,7 @@ export const TaskList: React.FC< TaskListProps > = ( {
};
const trackClick = ( task: TaskType ) => {
recordEvent( `${ eventName }_click`, {
recordEvent( `${ listEventPrefix }click`, {
task_name: task.id,
} );
};