Update Edit props type for name

This commit is contained in:
Matt Sherman 2023-09-27 23:40:02 -04:00
parent 120efa3022
commit 2f11689672
2 changed files with 5 additions and 3 deletions

View File

@ -9,7 +9,6 @@ import {
useState,
} from '@wordpress/element';
import { BlockEditProps } from '@wordpress/blocks';
import { useInstanceId } from '@wordpress/compose';
import { cleanForSlug } from '@wordpress/url';
import { useSelect, useDispatch } from '@wordpress/data';
@ -39,8 +38,11 @@ import { EditProductLinkModal } from '../../components/edit-product-link-modal';
import { useValidation } from '../../contexts/validation-context';
import { NameBlockAttributes } from './types';
import { useProductEdits } from '../../hooks/use-product-edits';
import { ProductEditorBlockEditProps } from '../../types';
export function Edit( { attributes }: BlockEditProps< NameBlockAttributes > ) {
export function Edit( {
attributes,
}: ProductEditorBlockEditProps< NameBlockAttributes > ) {
const blockProps = useWooBlockProps( attributes );
const { editEntityRecord, saveEntityRecord } = useDispatch( 'core' );

View File

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