From d792cf376b922a1a90286ebff0c21919beafe6db Mon Sep 17 00:00:00 2001 From: Jason Adams Date: Mon, 9 Oct 2023 10:38:29 -0600 Subject: [PATCH] fix: add missing import and fix ts error --- .../resources/js/form-builder/src/blocks/section/Edit.tsx | 1 + .../js/form-builder/src/blocks/section/EmptyBlockInserter.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FormBuilder/resources/js/form-builder/src/blocks/section/Edit.tsx b/src/FormBuilder/resources/js/form-builder/src/blocks/section/Edit.tsx index 8b064b141a..6b9748d51d 100644 --- a/src/FormBuilder/resources/js/form-builder/src/blocks/section/Edit.tsx +++ b/src/FormBuilder/resources/js/form-builder/src/blocks/section/Edit.tsx @@ -18,6 +18,7 @@ export default function Edit(props: BlockEditProps) { const hasChildBlocks = useSelect( (select) => { + // @ts-ignore const {getBlockOrder} = select(blockEditorStore); return getBlockOrder(clientId).length > 0; diff --git a/src/FormBuilder/resources/js/form-builder/src/blocks/section/EmptyBlockInserter.tsx b/src/FormBuilder/resources/js/form-builder/src/blocks/section/EmptyBlockInserter.tsx index 1dca505df0..7ab5fd4d6e 100644 --- a/src/FormBuilder/resources/js/form-builder/src/blocks/section/EmptyBlockInserter.tsx +++ b/src/FormBuilder/resources/js/form-builder/src/blocks/section/EmptyBlockInserter.tsx @@ -1,6 +1,6 @@ import {Button, Tooltip} from '@wordpress/components'; import {Inserter} from '@wordpress/block-editor'; -import {_x, sprintf} from '@wordpress/i18n'; +import {__, _x} from '@wordpress/i18n'; /** * The inserter used in sections for dragging and dropping blocks or clicking to add a block. @@ -12,7 +12,7 @@ export default function EmptyBlockInserter({rootClientId}) { rootClientId={rootClientId} __experimentalIsQuick className="give-section__empty-block-inserter" - renderToggle={({onToggle, disabled, isOpen, blockTitle, hasSingleBlockType}) => { + renderToggle={({onToggle, disabled, isOpen}) => { const label = _x('Add block', 'Generic label for block inserter button', 'give'); return (