diff --git a/packages/edit-site/src/components/sidebar-edit-mode/template-panel/index.js b/packages/edit-site/src/components/sidebar-edit-mode/template-panel/index.js index 9d57995d163305..0b7bc4ee0a9612 100644 --- a/packages/edit-site/src/components/sidebar-edit-mode/template-panel/index.js +++ b/packages/edit-site/src/components/sidebar-edit-mode/template-panel/index.js @@ -37,7 +37,7 @@ const CARD_ICONS = { function TemplatesList( { availableTemplates, onSelect } ) { const shownTemplates = useAsyncList( availableTemplates ); - if ( ! availableTemplates || availableTemplates?.length < 2 ) { + if ( ! availableTemplates || availableTemplates?.length === 0 ) { return null; } @@ -105,22 +105,25 @@ export default function TemplatePanel() { - - - - { __( - 'Choose a predefined pattern to switch up the look of your template.' // TODO - make this dynamic? - ) } - - - - + { availablePatterns?.length > 0 && ( + + + + { __( + 'Choose a predefined pattern to switch up the look of your template.' // TODO - make this dynamic? + ) } + + + + + + ) }
- { __( - 'Choose a predefined pattern to switch up the look of your template.' // TODO - make this dynamic? - ) } -
+ { __( + 'Choose a predefined pattern to switch up the look of your template.' // TODO - make this dynamic? + ) } +