/** * External dependencies */ import { kebabCase } from 'lodash'; import { decodeEntities } from '@wordpress/html-entities'; import type { ProductResponseItemData } from '@woocommerce/type-defs/product-response'; /** * Internal dependencies */ import './style.scss'; interface ProductDetailsProps { details: ProductResponseItemData[]; } // Component to display cart item data and variations. const ProductDetails = ( { details = [], }: ProductDetailsProps ): JSX.Element | null => { if ( ! Array.isArray( details ) ) { return null; } details = details.filter( ( detail ) => ! detail.hidden ); if ( details.length === 0 ) { return null; } return ( ); }; export default ProductDetails;