Skip to content

Commit

Permalink
Style Book: Disable the device preview button in the header (#68841)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: shimotmk <[email protected]>
  • Loading branch information
4 people authored Jan 24, 2025
1 parent f14a977 commit a411f33
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/editor/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ function Header( {
[ 'post', 'page', 'wp_template' ].includes( postType ) &&
hasSectionRootClientId;

const disablePreviewOption = [
NAVIGATION_POST_TYPE,
TEMPLATE_PART_POST_TYPE,
PATTERN_POST_TYPE,
].includes( postType );
const disablePreviewOption =
[
NAVIGATION_POST_TYPE,
TEMPLATE_PART_POST_TYPE,
PATTERN_POST_TYPE,
].includes( postType ) || forceDisableBlockTools;

const [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =
useState( true );
Expand Down

0 comments on commit a411f33

Please sign in to comment.