From f781940c27468078bb09617052cdffc2a580de00 Mon Sep 17 00:00:00 2001 From: Matt Sherman Date: Wed, 27 Sep 2023 23:41:58 -0400 Subject: [PATCH] Update Edit props type for taxonomy --- packages/js/product-editor/src/blocks/taxonomy/edit.tsx | 5 ++--- packages/js/product-editor/src/blocks/taxonomy/index.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/js/product-editor/src/blocks/taxonomy/edit.tsx b/packages/js/product-editor/src/blocks/taxonomy/edit.tsx index 33e3a1fe570..6c4e590cad1 100644 --- a/packages/js/product-editor/src/blocks/taxonomy/edit.tsx +++ b/packages/js/product-editor/src/blocks/taxonomy/edit.tsx @@ -22,6 +22,7 @@ import { useSelect } from '@wordpress/data'; import { CreateTaxonomyModal } from './create-taxonomy-modal'; import { Taxonomy, TaxonomyMetadata } from './types'; import useTaxonomySearch from './use-taxonomy-search'; +import { ProductEditorBlockEditProps } from '../../types'; interface TaxonomyBlockAttributes extends BlockAttributes { label: string; @@ -34,9 +35,7 @@ interface TaxonomyBlockAttributes extends BlockAttributes { export function Edit( { attributes, -}: { - attributes: TaxonomyBlockAttributes; -} ) { +}: ProductEditorBlockEditProps< TaxonomyBlockAttributes > ) { const blockProps = useWooBlockProps( attributes ); const { hierarchical }: TaxonomyMetadata = useSelect( ( select ) => diff --git a/packages/js/product-editor/src/blocks/taxonomy/index.ts b/packages/js/product-editor/src/blocks/taxonomy/index.ts index 37f321821db..5322eeb221e 100644 --- a/packages/js/product-editor/src/blocks/taxonomy/index.ts +++ b/packages/js/product-editor/src/blocks/taxonomy/index.ts @@ -22,5 +22,5 @@ export const init = () => registerWooBlockType( { name, metadata: metadata as never, - settings, + settings: settings as never, } );