Update Edit props type for taxonomy

This commit is contained in:
Matt Sherman 2023-09-27 23:41:58 -04:00
parent abe02a4d6c
commit f781940c27
2 changed files with 3 additions and 4 deletions

View File

@ -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 ) =>

View File

@ -22,5 +22,5 @@ export const init = () =>
registerWooBlockType( {
name,
metadata: metadata as never,
settings,
settings: settings as never,
} );