Skip to content

Commit

Permalink
Disable starter page options in preview mode
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Apr 15, 2024
1 parent 5486788 commit 5c6baa8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/editor/src/components/start-page-options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,13 @@ export default function StartPageOptions() {
isEditedPostEmpty,
getCurrentPostType,
getCurrentPostId,
getEditorSettings,
} = select( editorStore );
const { __unstableIsPreviewMode: isPreviewMode } = getEditorSettings();

return {
shouldEnableModal: ! isEditedPostDirty() && isEditedPostEmpty(),
shouldEnableModal:
! isPreviewMode && ! isEditedPostDirty() && isEditedPostEmpty(),
postType: getCurrentPostType(),
postId: getCurrentPostId(),
};
Expand Down

0 comments on commit 5c6baa8

Please sign in to comment.