diff --git a/packages/editor/src/components/post-publish-panel/index.js b/packages/editor/src/components/post-publish-panel/index.js index 4d41e872bc7230..e6d324624fab01 100644 --- a/packages/editor/src/components/post-publish-panel/index.js +++ b/packages/editor/src/components/post-publish-panel/index.js @@ -60,12 +60,14 @@ export class PostPublishPanel extends Component { PrePublishExtension, ...additionalProps } = this.props; - const isPublishedOrScheduled = isPublished || ( isScheduled && isBeingScheduled ); const propsForPanel = omit( additionalProps, [ 'hasPublishAction', 'isDirty' ] ); + const isPublishedOrScheduled = isPublished || ( isScheduled && isBeingScheduled ); + const isPrePublish = ! isPublishedOrScheduled && ! isSaving; + const isPostPublish = isPublishedOrScheduled && ! isSaving; return (
diff --git a/packages/editor/src/components/post-publish-panel/test/__snapshots__/index.js.snap b/packages/editor/src/components/post-publish-panel/test/__snapshots__/index.js.snap index 81a53981d74d78..574787b931a8d4 100644 --- a/packages/editor/src/components/post-publish-panel/test/__snapshots__/index.js.snap +++ b/packages/editor/src/components/post-publish-panel/test/__snapshots__/index.js.snap @@ -21,7 +21,9 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu