{ isSelected ? (
@@ -43,7 +41,7 @@ const Edit = ( { blockProps, block } ) => {
/>
) }
-
+ >
);
};
diff --git a/js/blocks/components/fetch-input.js b/js/blocks/components/fetch-input.js
index 37134cda4..e7b4b263c 100644
--- a/js/blocks/components/fetch-input.js
+++ b/js/blocks/components/fetch-input.js
@@ -12,14 +12,14 @@ import classNames from 'classnames';
/**
* WordPress dependencies
*/
-const { __, sprintf, _n } = wp.i18n;
-const { Component, createRef } = wp.element;
-const { decodeEntities } = wp.htmlEntities;
-const { UP, DOWN, ENTER } = wp.keycodes;
-const { BaseControl, Spinner, withSpokenMessages, Popover } = wp.components;
-const { withInstanceId } = wp.compose;
-const apiFetch = wp.apiFetch;
-const { addQueryArgs } = wp.url;
+import { __, sprintf, _n } from '@wordpress/i18n';
+import { Component, createRef } from '@wordpress/element';
+import { decodeEntities } from '@wordpress/html-entities';
+import { UP, DOWN, ENTER } from '@wordpress/keycodes';
+import { BaseControl, Spinner, withSpokenMessages, Popover } from '@wordpress/components';
+import { withInstanceId } from '@wordpress/compose';
+import { addQueryArgs } from '@wordpress/url';
+const { apiFetch } = wp;
// Since FetchInput is rendered in the context of other inputs, but should be
// considered a separate modal node, prevent keyboard events from propagating
diff --git a/js/blocks/components/fields.js b/js/blocks/components/fields.js
index d31244aa1..1a4e137aa 100644
--- a/js/blocks/components/fields.js
+++ b/js/blocks/components/fields.js
@@ -1,8 +1,8 @@
/**
* WordPress dependencies
*/
-const { applyFilters } = wp.hooks;
-const { select } = wp.data;
+import { applyFilters } from '@wordpress/hooks';
+import { select } from '@wordpress/data';
/**
* Internal dependencies
diff --git a/js/blocks/components/image.js b/js/blocks/components/image.js
index 290826bd6..ef0312718 100644
--- a/js/blocks/components/image.js
+++ b/js/blocks/components/image.js
@@ -1,9 +1,12 @@
-const { BaseControl, Button, Placeholder, DropZone, FormFileUpload, Spinner } = wp.components;
-const { withState } = wp.compose;
-const { withSelect } = wp.data;
-const { mediaUpload, MediaUpload, MediaUploadCheck } = wp.editor;
-const { Fragment } = wp.element;
-const { __, sprintf } = wp.i18n;
+/**
+ * WordPress dependencies
+ */
+import { BaseControl, Button, Placeholder, DropZone, FormFileUpload, Spinner } from '@wordpress/components';
+import { withState } from '@wordpress/compose';
+import { withSelect } from '@wordpress/data';
+import { MediaUpload, MediaUploadCheck } from '@wordpress/block-editor';
+import { mediaUpload } from '@wordpress/editor';
+import { __, sprintf } from '@wordpress/i18n';
const ALLOWED_TYPES = [ 'image' ];
const DEFAULT_IMG_ID = 0;
@@ -96,7 +99,7 @@ const Image = withSelect( ( select, ownProps ) => {
) }
{ ! isUploading && (
-
+ <>
{
) }
/>
-