diff --git a/client/homescreen/activity-panel/reviews/index.js b/client/homescreen/activity-panel/reviews/index.js index 49a11bbae17..ca58b235ac2 100644 --- a/client/homescreen/activity-panel/reviews/index.js +++ b/client/homescreen/activity-panel/reviews/index.js @@ -69,7 +69,7 @@ class ReviewsPanel extends Component { actions: [ { label: __( 'Undo', 'woocommerce-admin' ), - onClick: () => { + callback: () => { updateReview( reviewId, { @@ -113,7 +113,7 @@ class ReviewsPanel extends Component { actions: [ { label: __( 'Undo', 'woocommerce-admin' ), - onClick: () => { + callback: () => { updateReview( reviewId, { diff --git a/client/homescreen/activity-panel/stock/card.js b/client/homescreen/activity-panel/stock/card.js index 0f5670ae69d..823b0600ab7 100644 --- a/client/homescreen/activity-panel/stock/card.js +++ b/client/homescreen/activity-panel/stock/card.js @@ -100,7 +100,7 @@ export class ProductStockCard extends Component { actions: [ { label: __( 'Undo', 'woocommerce-admin' ), - onClick: () => { + callback: () => { updateProductStock( product, product.stock_quantity diff --git a/client/inbox-panel/dismiss-all-modal.js b/client/inbox-panel/dismiss-all-modal.js index 5fe8387ec3b..b279fefa632 100644 --- a/client/inbox-panel/dismiss-all-modal.js +++ b/client/inbox-panel/dismiss-all-modal.js @@ -27,7 +27,7 @@ const DismissAllModal = ( { onClose } ) => { actions: [ { label: __( 'Undo', 'woocommerce-admin' ), - onClick: () => { + callback: () => { batchUpdateNotes( notesRemoved.map( ( note ) => note.id ), { diff --git a/client/inbox-panel/index.js b/client/inbox-panel/index.js index bf4d84949bd..65a32594541 100644 --- a/client/inbox-panel/index.js +++ b/client/inbox-panel/index.js @@ -250,7 +250,7 @@ const InboxPanel = ( { showHeader = true } ) => { actions: [ { label: __( 'Undo', 'woocommerce-admin' ), - onClick: () => { + callback: () => { updateNote( noteId, { is_deleted: 0, } ); diff --git a/client/tasks/fills/appearance.js b/client/tasks/fills/appearance.js index e3a4632487c..1852f405355 100644 --- a/client/tasks/fills/appearance.js +++ b/client/tasks/fills/appearance.js @@ -172,7 +172,7 @@ class Appearance extends Component { 'Customize', 'woocommerce-admin' ), - onClick: () => { + callback: () => { queueRecordEvent( 'tasklist_appearance_customize_homepage', {} diff --git a/client/tasks/task-list-item.tsx b/client/tasks/task-list-item.tsx index 2349327c194..05e23d35bce 100644 --- a/client/tasks/task-list-item.tsx +++ b/client/tasks/task-list-item.tsx @@ -69,7 +69,7 @@ export const TaskListItem: React.FC< TaskListItemProps > = ( { actions: [ { label: __( 'Undo', 'woocommerce-admin' ), - onClick: () => undoDismissTask( id ), + callback: () => undoDismissTask( id ), }, ], } ); @@ -84,7 +84,7 @@ export const TaskListItem: React.FC< TaskListItemProps > = ( { actions: [ { label: __( 'Undo', 'woocommerce-admin' ), - onClick: () => undoSnoozeTask( id ), + callback: () => undoSnoozeTask( id ), }, ], } diff --git a/client/two-column-tasks/task-list.js b/client/two-column-tasks/task-list.js index 9fead528b32..315e8fd386f 100644 --- a/client/two-column-tasks/task-list.js +++ b/client/two-column-tasks/task-list.js @@ -76,7 +76,7 @@ export const TaskList = ( { actions: [ { label: __( 'Undo', 'woocommerce-admin' ), - onClick: () => undoDismissTask( id ), + callback: () => undoDismissTask( id ), }, ], } ); diff --git a/packages/customer-effort-score/src/index.js b/packages/customer-effort-score/src/index.js index a92a22bb9ed..91e3813d451 100644 --- a/packages/customer-effort-score/src/index.js +++ b/packages/customer-effort-score/src/index.js @@ -50,7 +50,7 @@ export function CustomerEffortScore( { actions: [ { label: __( 'Give feedback', 'woocommerce-admin' ), - onClick: () => { + callback: () => { setVisible( true ); onModalShownCallback(); }, diff --git a/packages/customer-effort-score/src/test/index.js b/packages/customer-effort-score/src/test/index.js index fb016334a81..27b2c4379c0 100644 --- a/packages/customer-effort-score/src/test/index.js +++ b/packages/customer-effort-score/src/test/index.js @@ -83,7 +83,7 @@ describe( 'CustomerEffortScore', () => { // Assuming the first action is the "Give feedback" action, // manually call callback. - const callback = actions[ 0 ].onClick; + const callback = actions[ 0 ].callback; if ( typeof callback === 'function' ) { callback(); }