From c8de7a9cba27202e6fa6c545fa490015eaad68b1 Mon Sep 17 00:00:00 2001 From: Matt Chowning Date: Wed, 23 Mar 2022 10:05:51 -0400 Subject: [PATCH] Remove error banners from native media&text and audio blocks --- packages/block-library/src/audio/edit.native.js | 5 ----- .../src/media-text/media-container.native.js | 15 +-------------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/packages/block-library/src/audio/edit.native.js b/packages/block-library/src/audio/edit.native.js index a08fbe75f59f9..c6362c522bba3 100644 --- a/packages/block-library/src/audio/edit.native.js +++ b/packages/block-library/src/audio/edit.native.js @@ -66,10 +66,6 @@ function AudioEdit( { const { createErrorNotice } = useDispatch( noticesStore ); - const onError = () => { - createErrorNotice( __( 'Failed to insert audio file.' ) ); - }; - function toggleAttribute( attribute ) { return ( newValue ) => { setAttributes( { [ attribute ]: newValue } ); @@ -144,7 +140,6 @@ function AudioEdit( { { - const { createErrorNotice } = dispatch( noticesStore ); - - return { createErrorNotice }; - } ), - withPreferredColorScheme, -] )( MediaContainer ); +export default compose( [ withPreferredColorScheme ] )( MediaContainer );