From 9f14b7e2c7744cd5a8690b35c47e379b48c44573 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 1 Jul 2021 18:10:15 +0200 Subject: [PATCH] Revert workaround for embed preview in native --- packages/block-library/src/embed/edit.js | 7 +------ packages/block-library/src/embed/embed-preview.native.js | 6 ++++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/embed/edit.js b/packages/block-library/src/embed/edit.js index f31c089748d97..947f0a2de5119 100644 --- a/packages/block-library/src/embed/edit.js +++ b/packages/block-library/src/embed/edit.js @@ -84,12 +84,7 @@ const EmbedEdit = ( props ) => { return { fetching: false, cannotEmbed: false }; } - const embedPreview = Platform.select( { - web: getEmbedPreview( attributesUrl ), - // On the native version, the embed previews are not supported yet, - // so we return instead the URL as the preview. - native: attributesUrl, - } ); + const embedPreview = getEmbedPreview( attributesUrl ); const previewIsFallback = isPreviewEmbedFallback( attributesUrl ); // The external oEmbed provider does not exist. We got no type info and no html. diff --git a/packages/block-library/src/embed/embed-preview.native.js b/packages/block-library/src/embed/embed-preview.native.js index edb2dce755006..5f4e418a4aa91 100644 --- a/packages/block-library/src/embed/embed-preview.native.js +++ b/packages/block-library/src/embed/embed-preview.native.js @@ -25,7 +25,6 @@ const EmbedPreview = ( { isSelected, onBlur, onFocus, - preview, } ) => { const [ isCaptionSelected, setIsCaptionSelected ] = useState( false ); const stylePlaceholder = usePreferredColorSchemeStyle( @@ -70,7 +69,10 @@ const EmbedPreview = ( { > - { preview } + + Embed Preview will be directly above the Block Caption + component when it is implemented. +