Update Edit props type for variations

This commit is contained in:
Matt Sherman 2023-09-27 23:42:29 -04:00
parent 99839030e9
commit 435e24c58c
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,6 @@
* External dependencies * External dependencies
*/ */
import classNames from 'classnames'; import classNames from 'classnames';
import type { BlockEditProps } from '@wordpress/blocks';
import { Button } from '@wordpress/components'; import { Button } from '@wordpress/components';
import { useWooBlockProps } from '@woocommerce/block-templates'; import { useWooBlockProps } from '@woocommerce/block-templates';
import { Product, ProductAttribute } from '@woocommerce/data'; import { Product, ProductAttribute } from '@woocommerce/data';
@ -33,10 +32,11 @@ import { getAttributeId } from '../../components/attribute-control/utils';
import { useProductVariationsHelper } from '../../hooks/use-product-variations-helper'; import { useProductVariationsHelper } from '../../hooks/use-product-variations-helper';
import { hasAttributesUsedForVariations } from '../../utils'; import { hasAttributesUsedForVariations } from '../../utils';
import { TRACKS_SOURCE } from '../../constants'; import { TRACKS_SOURCE } from '../../constants';
import { ProductEditorBlockEditProps } from '../../types';
export function Edit( { export function Edit( {
attributes, attributes,
}: BlockEditProps< VariationsBlockAttributes > ) { }: ProductEditorBlockEditProps< VariationsBlockAttributes > ) {
const { description } = attributes; const { description } = attributes;
const { generateProductVariations } = useProductVariationsHelper(); const { generateProductVariations } = useProductVariationsHelper();

View File

@ -22,6 +22,6 @@ export function init() {
return registerWooBlockType( { return registerWooBlockType( {
name, name,
metadata: metadata as never, metadata: metadata as never,
settings, settings: settings as never,
} ); } );
} }