/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { Button } from '@wordpress/components'; import { Icon, trendingUp } from '@wordpress/icons'; import { recordEvent } from '@woocommerce/tracks'; /** * Internal dependencies */ import { CollapsibleCard, CardBody, CenteredSpinner, } from '~/marketing/components'; import { useRecommendedPluginsWithoutChannels } from './useRecommendedPluginsWithoutChannels'; import { PluginsTabPanel } from './PluginsTabPanel'; import './DiscoverTools.scss'; export const DiscoverTools = () => { const { isInitializing, isLoading, data, installAndActivate } = useRecommendedPluginsWithoutChannels(); /** * Renders card body. * * - If loading is in progress, it renders a loading indicator. * - If there are zero plugins, it renders an empty content. * - Otherwise, it renders PluginsTabPanel. */ const renderCardContent = () => { if ( isInitializing ) { return ( ); } if ( data.length === 0 ) { return (
{ __( 'Continue to reach the right audiences and promote your products in ways that matter to them with our range of marketing solutions.', 'woocommerce' ) }
); } return ( ); }; return ( { renderCardContent() } ); };