We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab8e4f5 commit 7ab870fCopy full SHA for 7ab870f
1 file changed
src/blocks/plugins/patterns-library/library.js
@@ -205,13 +205,15 @@ const Library = ({
205
) }
206
207
<div className="o-library__modal__sidebar">
208
- <Button
209
- icon="heart"
210
- isPressed={ 'favorites' === selectedCategory }
211
- onClick={ () => setSelectedCategory( 'favorites' ) }
212
- >
213
- { __( 'My Favorites', 'otter-blocks' ) }
214
- </Button>
+ { getFavorites?.length > 0 && (
+ <Button
+ icon="heart"
+ isPressed={ 'favorites' === selectedCategory }
+ onClick={ () => setSelectedCategory( 'favorites' ) }
+ >
+ { __( 'My Favorites', 'otter-blocks' ) }
215
+ </Button>
216
+ )}
217
218
{( tcCategories.length < 1 && Boolean( window?.themeisleGutenberg?.hasPatternSources ) ) && (
219
<Button
0 commit comments