/** * External dependencies */ import { __, sprintf } from '@wordpress/i18n'; import { recordEvent } from '@woocommerce/tracks'; /** * Internal dependencies */ import { Post } from './types'; type PostTileProps = { post: Post; }; export const PostTile: React.FC< PostTileProps > = ( { post } ) => { return ( { recordEvent( 'marketing_knowledge_article', { title: post.title, } ); } } >
{ post.image && }
{ post.title }
{ // translators: %s: author's name. sprintf( __( 'By %s', 'woocommerce' ), post.author_name ) } { post.author_avatar && ( ) }
); };