This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
assets/js/blocks/products Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ type EditorAttributes = {
5353 alignButtons : boolean ;
5454 contentVisibility : object ;
5555 orderby : string ;
56- layoutConfig : Array < number > ;
56+ layoutConfig : Array < object > ;
5757 isPreview : boolean ;
5858} ;
5959
@@ -233,6 +233,7 @@ class Editor extends Component< EditorProps, EditorState > {
233233 < li className = "wc-block-grid__product" >
234234 < ProductDataContextProvider
235235 product = { previewProducts [ 0 ] }
236+ isLoading = { false }
236237 >
237238 { /* @ts -expect-error: `InnerBlocks` is a component that is typed in WordPress core*/ }
238239 < InnerBlocks { ...InnerBlockProps } />
Original file line number Diff line number Diff line change 22 * External dependencies
33 */
44import classnames from 'classnames' ;
5+ import { BlockInstance } from '@wordpress/blocks' ;
56
67/**
78 * Internal dependencies
@@ -12,7 +13,7 @@ import { ImageSizing } from '../../atomic/blocks/product-elements/image/types';
1213/**
1314 * The default layout built from the default template.
1415 */
15- export const DEFAULT_PRODUCT_LIST_LAYOUT = [
16+ export const DEFAULT_PRODUCT_LIST_LAYOUT : [ string , object ? ] [ ] = [
1617 [ 'woocommerce/product-image' , { imageSizing : ImageSizing . THUMBNAIL } ] ,
1718 [ 'woocommerce/product-title' ] ,
1819 [ 'woocommerce/product-price' ] ,
@@ -25,7 +26,9 @@ export const DEFAULT_PRODUCT_LIST_LAYOUT = [
2526 *
2627 * @param {Object[] } innerBlocks Inner block components.
2728 */
28- export const getProductLayoutConfig = ( innerBlocks ) => {
29+ export const getProductLayoutConfig = (
30+ innerBlocks : BlockInstance [ ]
31+ ) : [ string , object ? ] [ ] => {
2932 if ( ! innerBlocks || innerBlocks . length === 0 ) {
3033 return [ ] ;
3134 }
You can’t perform that action at this time.
0 commit comments