/** * External dependencies */ import PropTypes from 'prop-types'; import { recordEvent } from '@woocommerce/tracks'; /** * Internal dependencies */ import './style.scss'; import { ProductIcon } from '~/marketing/components'; import { getRecommendationSource } from '~/marketing/utils'; import { getInAppPurchaseUrl } from '~/lib/in-app-purchase'; const RecommendedExtensionsItem = ( { title, description, url, product, category, } ) => { const onProductClick = () => { recordEvent( 'marketing_recommended_extension', { name: title, source: getRecommendationSource(), } ); }; const classNameBase = 'woocommerce-marketing-recommended-extensions-item'; const connectURL = getInAppPurchaseUrl( url ); // Temporary fix to account for different styles between marketing & coupons if ( category === 'coupons' && product === 'automatewoo' ) { product = `automatewoo-alt`; } return (

{ title }

{ description }

); }; RecommendedExtensionsItem.propTypes = { title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, url: PropTypes.string.isRequired, product: PropTypes.string.isRequired, category: PropTypes.string.isRequired, }; export default RecommendedExtensionsItem;