diff --git a/packages/block-library/src/gallery/edit.js b/packages/block-library/src/gallery/edit.js index f2faa40110dd13..1a7ce5fae04f8c 100644 --- a/packages/block-library/src/gallery/edit.js +++ b/packages/block-library/src/gallery/edit.js @@ -6,7 +6,6 @@ import clsx from 'clsx'; /** * WordPress dependencies */ -import { compose } from '@wordpress/compose'; import { BaseControl, PanelBody, @@ -17,7 +16,6 @@ import { MenuGroup, MenuItem, ToolbarDropdownMenu, - withNotices, } from '@wordpress/components'; import { store as blockEditorStore, @@ -31,7 +29,6 @@ import { import { Platform, useEffect, useMemo } from '@wordpress/element'; import { __, _x, sprintf } from '@wordpress/i18n'; import { useSelect, useDispatch } from '@wordpress/data'; -import { withViewportMatch } from '@wordpress/viewport'; import { View } from '@wordpress/primitives'; import { createBlock } from '@wordpress/blocks'; import { createBlobURL } from '@wordpress/blob'; @@ -98,7 +95,7 @@ const MOBILE_CONTROL_PROPS_RANGE_CONTROL = Platform.isNative const DEFAULT_BLOCK = { name: 'core/image' }; const EMPTY_ARRAY = []; -function GalleryEdit( props ) { +export default function GalleryEdit( props ) { const { setAttributes, attributes, @@ -696,7 +693,3 @@ function GalleryEdit( props ) { ); } -export default compose( [ - withNotices, - withViewportMatch( { isNarrow: '< small' } ), -] )( GalleryEdit ); diff --git a/packages/block-library/src/gallery/gallery.native.js b/packages/block-library/src/gallery/gallery.native.js index 7fc280809db843..a5fa2db4fcf029 100644 --- a/packages/block-library/src/gallery/gallery.native.js +++ b/packages/block-library/src/gallery/gallery.native.js @@ -22,6 +22,7 @@ import { useState, useEffect } from '@wordpress/element'; import { mediaUploadSync } from '@wordpress/react-native-bridge'; import { WIDE_ALIGNMENTS } from '@wordpress/components'; import { useResizeObserver } from '@wordpress/compose'; +import { withViewportMatch } from '@wordpress/viewport'; const TILE_SPACING = 8; @@ -120,4 +121,4 @@ export const Gallery = ( props ) => { ); }; -export default Gallery; +export default withViewportMatch( { isNarrow: '< small' } )( Gallery );