diff --git a/plugins/woocommerce-admin/client/marketplace/components/product-list-content/product-list-content.tsx b/plugins/woocommerce-admin/client/marketplace/components/product-list-content/product-list-content.tsx index 55283701496..91028817c34 100644 --- a/plugins/woocommerce-admin/client/marketplace/components/product-list-content/product-list-content.tsx +++ b/plugins/woocommerce-admin/client/marketplace/components/product-list-content/product-list-content.tsx @@ -1,14 +1,8 @@ /** * External dependencies */ -import { - createInterpolateElement, - Fragment, - useEffect, - useState, -} from '@wordpress/element'; +import { Fragment, useEffect, useState } from '@wordpress/element'; import classnames from 'classnames'; -import { __ } from '@wordpress/i18n'; import { addQueryArgs } from '@wordpress/url'; /** @@ -120,49 +114,26 @@ export default function ProductListContent( props: { } ), } } /> - { index === bannerPosition && ( - { - const customizeStoreDesignUrl = - addQueryArgs( - `${ ADMIN_URL }admin.php`, - { - page: 'wc-admin', - path: '/customize-store/design', - } - ); - window.location.href = - customizeStoreDesignUrl; - } } - /> - ) } + { index === bannerPosition && + props.type === 'theme' && ( + { + const customizeStoreDesignUrl = + addQueryArgs( + `${ ADMIN_URL }admin.php`, + { + page: 'wc-admin', + path: '/customize-store/design', + } + ); + window.location.href = + customizeStoreDesignUrl; + } } + /> + ) } ) ) } -
- { __( 'Didn’t find a theme you like?', 'woocommerce' ) } - { createInterpolateElement( - __( - ' Browse the WordPress.org theme directory to discover more.', - 'woocommerce' - ), - { - a: ( - // eslint-disable-next-line jsx-a11y/anchor-has-content - - ), - } - ) } -
); } diff --git a/plugins/woocommerce-admin/client/marketplace/components/products/products.tsx b/plugins/woocommerce-admin/client/marketplace/components/products/products.tsx index 2d252850517..3b23df17cab 100644 --- a/plugins/woocommerce-admin/client/marketplace/components/products/products.tsx +++ b/plugins/woocommerce-admin/client/marketplace/components/products/products.tsx @@ -2,7 +2,11 @@ * External dependencies */ import { __, _n, sprintf } from '@wordpress/i18n'; -import { useContext, useState } from '@wordpress/element'; +import { + createInterpolateElement, + useContext, + useState, +} from '@wordpress/element'; import { getNewPath, navigateTo, useQuery } from '@woocommerce/navigation'; import { Button } from '@wordpress/components'; import classnames from 'classnames'; @@ -173,6 +177,34 @@ export default function Products( props: ProductsProps ) { searchTerm={ props.searchTerm } category={ category } /> + { props.type === 'theme' && ( +
+ + { __( 'Didn’t find a theme you like?', 'woocommerce' ) } + + { createInterpolateElement( + __( + ' Browse the WordPress.org theme directory to discover more.', + 'woocommerce' + ), + { + a: ( + // eslint-disable-next-line jsx-a11y/anchor-has-content + + ), + } + ) } +
+ ) } { showAllButton && (