First pass at server-side render (working)

This commit is contained in:
Justin Foell
2020-11-27 12:57:33 -06:00
parent 5f3572cd71
commit 2c8c70123c
2 changed files with 23 additions and 1 deletions
+9 -1
View File
@@ -7,6 +7,7 @@ const { Component } = wp.element;
const { InspectorControls } = wp.editor;
const { PanelBody, ToggleControl } = wp.components;
const { isEmpty } = lodash;
const { serverSideRender: ServerSideRender } = wp;
/**
@@ -83,7 +84,14 @@ class Edit extends Component {
<EmbedControls
switchBackToURLInput={ this.switchBackToURLInput }
/>
<img className="wp-strava-img" src={placeholderActivityImg} />
<ServerSideRender
block="wp-strava/activity"
attributes={ {
url: url,
imageOnly: imageOnly,
displayMarkers: displayMarkers,
} }
/>
<InspectorControls>
<PanelBody
title={ __( 'Display Options' ) }