Skip to content

Commit

Permalink
Use JSX to define the photo preview
Browse files Browse the repository at this point in the history
  • Loading branch information
notnownikki committed Jun 21, 2017
1 parent 47b80d2 commit 503e780
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blocks/library/embed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ function getEmbedBlockSettings( { title, icon, category = 'embed' } ) {
}

getPhotoHtml( photo ) {
return `<p><img src="${ photo.thumbnail_url }" alt="${ photo.title }" /></p>`;
const photoPreview = <p><img src={ photo.thumbnail_url } alt={ photo.title } /></p>;
return wp.element.renderToString( photoPreview );
}

doServerSideRender( event ) {
Expand Down

0 comments on commit 503e780

Please sign in to comment.