File "save.js"

Full Path: /home/warrior1/public_html/plugins/woocommerce/packages/woocommerce-blocks/assets/js/blocks/products/all-products/save.js
File size: 602 bytes
MIME-type: text/x-java
Charset: utf-8

/**
 * External dependencies
 */
import { InnerBlocks } from '@wordpress/block-editor';

/**
 * Internal dependencies
 */
import { getBlockClassName } from '../utils.js';

export default function save( { attributes } ) {
	const dataAttributes = {};
	Object.keys( attributes )
		.sort()
		.forEach( ( key ) => {
			dataAttributes[ key ] = attributes[ key ];
		} );
	const data = {
		'data-attributes': JSON.stringify( dataAttributes ),
	};
	return (
		<div
			className={ getBlockClassName(
				'wc-block-all-products',
				attributes
			) }
			{ ...data }
		>
			<InnerBlocks.Content />
		</div>
	);
}