Refactor Filter Wrapper to remove usage of useInnerBlocksProps (https://github.com/woocommerce/woocommerce-blocks/pull/8095)

This commit is contained in:
Tung Du 2023-01-04 17:31:17 +07:00 committed by GitHub
parent 6c379258e6
commit 2b20e2d3f3
1 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import { __ } from '@wordpress/i18n';
import { createBlock, registerBlockType } from '@wordpress/blocks';
import type { BlockInstance } from '@wordpress/blocks';
import { toggle } from '@woocommerce/icons';
import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
import { useBlockProps, InnerBlocks } from '@wordpress/block-editor';
import {
Icon,
category,
@ -111,10 +111,11 @@ const transformFilterBlock = (
registerBlockType( metadata, {
edit,
save() {
const innerBlocksProps = useInnerBlocksProps.save(
useBlockProps.save()
return (
<div { ...useBlockProps.save() }>
<InnerBlocks.Content />
</div>
);
return <div { ...innerBlocksProps } />;
},
variations: [
{