Skip to content

Commit

Permalink
Avoid double button rendering in the patterns screen
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jun 23, 2023
1 parent e74207b commit da9b7e1
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/edit-site/src/components/add-new-pattern/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { privateApis as routerPrivateApis } from '@wordpress/router';
import CreatePatternModal from '../create-pattern-modal';
import CreateTemplatePartModal from '../create-template-part-modal';
import { unlock } from '../../lock-unlock';
import SidebarButton from '../sidebar-button';

const { useHistory } = unlock( routerPrivateApis );

Expand Down Expand Up @@ -66,13 +65,11 @@ export default function AddNewPattern() {
title: __( 'Create pattern' ),
},
] }
icon={
<SidebarButton
icon={ plus }
label={ __( 'Create pattern' ) }
/>
}
label={ __( 'Create pattern.' ) }
toggleProps={ {
className: 'edit-site-sidebar-button',
} }
icon={ plus }
label={ __( 'Create pattern' ) }
/>
{ showPatternModal && (
<CreatePatternModal
Expand Down

0 comments on commit da9b7e1

Please sign in to comment.