From 32266ff092bc2791a8f07e39d04d6f7f8261420f Mon Sep 17 00:00:00 2001 From: Dylan Munson <65001528+CodeyGuyDylan@users.noreply.github.com> Date: Fri, 7 Feb 2025 09:33:28 -0700 Subject: [PATCH] Add accidentally removed function --- .../_inc/components/products-table-view/index.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/packages/my-jetpack/_inc/components/products-table-view/index.tsx b/projects/packages/my-jetpack/_inc/components/products-table-view/index.tsx index 5c24d50d4e7e6..cae7fb393675d 100644 --- a/projects/packages/my-jetpack/_inc/components/products-table-view/index.tsx +++ b/projects/packages/my-jetpack/_inc/components/products-table-view/index.tsx @@ -34,7 +34,7 @@ import type { Operator, Option, } from '@wordpress/dataviews'; -import type { FC } from 'react'; +import type { FC, MouseEvent } from 'react'; import './style.scss'; @@ -134,6 +134,15 @@ const ProductsTableView: FC< ProductsTableViewProps > = ( { products } ) => { [ products, allProductData ] ); + const navigateToInterstitial = useCallback( + ( slug: string ) => ( event: MouseEvent< HTMLButtonElement > ) => { + event.preventDefault(); + recordEvent( `jetpack_myjetpack_product_list_item_${ slug }_learnmore_mobile_click` ); + navigate( `add-${ slug }` ); + }, + [ navigate, recordEvent ] + ); + const fields = useMemo( () => { return [ {