Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Jan 22, 2024
1 parent a65895a commit a86f308
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/edit-site/src/components/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const trashPostAction = {
},
supportsBulk: true,
hideModalHeader: true,
RenderModal: ( { items: posts, closeModal } ) => {
RenderModal: ( { items: posts, closeModal, onPerform } ) => {
const { createSuccessNotice, createErrorNotice } =
useDispatch( noticesStore );
const { deleteEntityRecord } = useDispatch( coreStore );
Expand All @@ -50,7 +50,7 @@ export const trashPostAction = {
: sprintf(
// translators: %d: The number of pages (2 or more).
__(
'Are you sure you want to delete "%d" pages?'
'Are you sure you want to delete %d pages?'
),
posts.length
) }
Expand Down Expand Up @@ -149,6 +149,10 @@ export const trashPostAction = {
} );
}
}
if ( onPerform ) {
onPerform();
}
closeModal();
} }
>
{ __( 'Delete' ) }
Expand Down Expand Up @@ -305,12 +309,12 @@ export function useRestorePostAction() {
? sprintf(
/* translators: The number of posts. */
__( '%d posts have been restored.' ),
decodeEntities( posts[ 0 ].title.rendered )
posts.length
)
: sprintf(
/* translators: The number of posts. */
__( '"%s" has been restored.' ),
posts.length
decodeEntities( posts[ 0 ].title.rendered )
),
{
type: 'snackbar',
Expand Down

0 comments on commit a86f308

Please sign in to comment.