/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { Button, ExternalLink } from '@wordpress/components'; import { Pill } from '@woocommerce/components'; import { getNewPath, navigateTo } from '@woocommerce/navigation'; import { recordEvent } from '@woocommerce/tracks'; import { useContext, useMemo } from '@wordpress/element'; /** * Internal dependencies */ import './woocommerce-services-item.scss'; import WooIcon from './woo-icon.svg'; import { LayoutContext } from '~/layout'; const WooCommerceServicesItem: React.FC< { isWCSInstalled: boolean | undefined; } > = ( { isWCSInstalled } ) => { const layoutContext = useContext( LayoutContext ); const updatedLayoutContext = useMemo( () => layoutContext.getExtendedContext( 'wc-settings' ), [ layoutContext ] ); const handleSetupClick = () => { recordEvent( 'tasklist_click', { task_name: 'shipping-recommendation', context: updatedLayoutContext.toString(), } ); navigateTo( { url: getNewPath( { task: 'shipping-recommendation' }, '/', {} ), } ); }; return (
Woocommerce Service Logo
{ __( 'Woocommerce Shipping', 'woocommerce' ) } { __( 'Recommended', 'woocommerce' ) } { __( 'Print USPS and DHL Express labels straight from your WooCommerce dashboard and save on shipping.', 'woocommerce' ) }
{ __( 'Learn more', 'woocommerce' ) }
); }; export default WooCommerceServicesItem;