Skip to content

Commit

Permalink
Make "My patterns" permanently visible (#52531)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskoster authored Jul 12, 2023
1 parent 04b3254 commit de71547
Showing 1 changed file with 20 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function SidebarNavigationScreenPatterns() {
const { templatePartAreas, hasTemplateParts, isLoading } =
useTemplatePartAreas();
const { patternCategories, hasPatterns } = usePatternCategories();
const { myPatterns, hasPatterns: hasMyPatterns } = useMyPatterns();
const { myPatterns } = useMyPatterns();

const isTemplatePartsMode = useSelect( ( select ) => {
const settings = select( editSiteStore ).getSettings();
Expand Down Expand Up @@ -153,23 +153,25 @@ export default function SidebarNavigationScreenPatterns() {
</Item>
</ItemGroup>
) }
{ hasMyPatterns && (
<ItemGroup className="edit-site-sidebar-navigation-screen-patterns__group">
<CategoryItem
key={ myPatterns.name }
count={ myPatterns.count }
label={ myPatterns.label }
icon={ starFilled }
id={ myPatterns.name }
type="wp_block"
isActive={
currentCategory ===
`${ myPatterns.name }` &&
currentType === 'wp_block'
}
/>
</ItemGroup>
) }
<ItemGroup className="edit-site-sidebar-navigation-screen-patterns__group">
<CategoryItem
key={ myPatterns.name }
count={
! myPatterns.count
? '0'
: myPatterns.count
}
label={ myPatterns.label }
icon={ starFilled }
id={ myPatterns.name }
type="wp_block"
isActive={
currentCategory ===
`${ myPatterns.name }` &&
currentType === 'wp_block'
}
/>
</ItemGroup>
{ hasTemplateParts && (
<TemplatePartGroup
areas={ templatePartAreas }
Expand Down

0 comments on commit de71547

Please sign in to comment.