Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
ToggleControl,
PanelBody,
Placeholder,
withNotices,
Button,
} from '@wordpress/components';
import {
Expand Down Expand Up @@ -54,7 +53,6 @@ function PostFeaturedImageDisplay( {
attributes,
setAttributes,
context: { postId, postType, queryId },
noticeUI,
} ) {
const isDescendentOfQueryLoop = !! queryId;
const { isLink, height, width, scale } = attributes;
Expand Down Expand Up @@ -111,7 +109,6 @@ function PostFeaturedImageDisplay( {
allowedTypes={ ALLOWED_MEDIA_TYPES }
onError={ onUploadError }
placeholder={ placeholder }
notices={ noticeUI }
mediaLibraryButton={ ( { open } ) => {
return (
<Button
Expand Down Expand Up @@ -181,12 +178,10 @@ function PostFeaturedImageDisplay( {
);
}

const PostFeaturedImageWithNotices = withNotices( PostFeaturedImageDisplay );

export default function PostFeaturedImageEdit( props ) {
const blockProps = useBlockProps();
if ( ! props.context?.postId ) {
return <div { ...blockProps }>{ placeholderChip }</div>;
}
return <PostFeaturedImageWithNotices { ...props } />;
return <PostFeaturedImageDisplay { ...props } />;
}