diff --git a/editor/sidebar/post-schedule/index.js b/editor/sidebar/post-schedule/index.js index 317184bbef4abf..ef35b175764e23 100644 --- a/editor/sidebar/post-schedule/index.js +++ b/editor/sidebar/post-schedule/index.js @@ -1,8 +1,13 @@ +/** + * External dependencies + */ +import { flowRight } from 'lodash'; + /** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { PanelRow, Dropdown, withAPIData } from '@wordpress/components'; +import { PanelRow, Dropdown, withAPIData, withInstanceId } from '@wordpress/components'; /** * Internal dependencies @@ -11,19 +16,21 @@ import './style.scss'; import PostScheduleLabel from '../../post-schedule/label'; import PostScheduleForm from '../../post-schedule'; -export function PostSchedule( { user } ) { +export function PostSchedule( { user, instanceId } ) { if ( ! user.data || ! user.data.capabilities.publish_posts ) { return null; } + const postScheduleSelectorId = 'post-schedule-selector-' + instanceId; return ( - { __( 'Publish' ) } + (