From 05bf111c9261f0262cd587d1957ae33299a4fc00 Mon Sep 17 00:00:00 2001 From: Niels Lange Date: Mon, 17 Apr 2023 12:48:00 +0700 Subject: [PATCH] Use consistent and semantically correct HTML elements in the Cart and Checkout blocks --- .../base/components/cart-checkout/order-summary/index.tsx | 1 - .../cart/inner-blocks/cart-order-summary-heading/block.tsx | 6 ++---- .../cart/inner-blocks/cart-order-summary-heading/edit.tsx | 6 ++---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/assets/js/base/components/cart-checkout/order-summary/index.tsx b/assets/js/base/components/cart-checkout/order-summary/index.tsx index 435bf0adc14..92ed94c4271 100644 --- a/assets/js/base/components/cart-checkout/order-summary/index.tsx +++ b/assets/js/base/components/cart-checkout/order-summary/index.tsx @@ -35,7 +35,6 @@ const OrderSummary = ( { { __( 'Order summary', 'woo-gutenberg-products-block' ) } } - titleTag="h2" >
{ cartItems.map( ( cartItem ) => { diff --git a/assets/js/blocks/cart/inner-blocks/cart-order-summary-heading/block.tsx b/assets/js/blocks/cart/inner-blocks/cart-order-summary-heading/block.tsx index 015c29f8f97..9e8d95928c5 100644 --- a/assets/js/blocks/cart/inner-blocks/cart-order-summary-heading/block.tsx +++ b/assets/js/blocks/cart/inner-blocks/cart-order-summary-heading/block.tsx @@ -1,7 +1,6 @@ /** * External dependencies */ -import Title from '@woocommerce/base-components/title'; import classnames from 'classnames'; const Block = ( { @@ -12,12 +11,11 @@ const Block = ( { content: string; } ): JSX.Element => { return ( - { content } - + ); }; diff --git a/assets/js/blocks/cart/inner-blocks/cart-order-summary-heading/edit.tsx b/assets/js/blocks/cart/inner-blocks/cart-order-summary-heading/edit.tsx index ee105b65b6d..97600b63206 100644 --- a/assets/js/blocks/cart/inner-blocks/cart-order-summary-heading/edit.tsx +++ b/assets/js/blocks/cart/inner-blocks/cart-order-summary-heading/edit.tsx @@ -2,7 +2,6 @@ * External dependencies */ import { PlainText, useBlockProps } from '@wordpress/block-editor'; -import Title from '@woocommerce/base-components/title'; import classnames from 'classnames'; /** @@ -24,8 +23,7 @@ export const Edit = ( { const blockProps = useBlockProps(); return (
- - +
); };