From 5f812d4b5b87d07d26878e12760dd3bb9703590e Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Wed, 13 Mar 2019 16:42:15 +0100 Subject: [PATCH] Use only one button for Set featured image and image preview. --- .../components/post-featured-image/index.js | 67 +++++++------------ 1 file changed, 26 insertions(+), 41 deletions(-) diff --git a/packages/editor/src/components/post-featured-image/index.js b/packages/editor/src/components/post-featured-image/index.js index 05e74ae5a2ace..ca3df956c41a4 100644 --- a/packages/editor/src/components/post-featured-image/index.js +++ b/packages/editor/src/components/post-featured-image/index.js @@ -46,30 +46,32 @@ function PostFeaturedImage( { currentPostId, featuredImageId, onUpdateImage, onR return (
- { !! featuredImageId && - - ( - - ) } - value={ featuredImageId } - /> - - } + + ( + + ) } + value={ featuredImageId } + /> + { !! featuredImageId && media && ! media.isLoading && } - { ! featuredImageId && -
- - ( - - ) } - /> - -
- } { !! featuredImageId &&