Skip to content

Commit

Permalink
Pages data view: Update quick-actions (#59551)
Browse files Browse the repository at this point in the history
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>
  • Loading branch information
6 people authored Mar 21, 2024
1 parent c657927 commit c97c26f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions packages/edit-site/src/components/actions/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* WordPress dependencies
*/
import { external, trash, backup } from '@wordpress/icons';
import { external, edit, backup } from '@wordpress/icons';
import { addQueryArgs } from '@wordpress/url';
import { useDispatch } from '@wordpress/data';
import { decodeEntities } from '@wordpress/html-entities';
Expand All @@ -27,8 +27,6 @@ const { useHistory } = unlock( routerPrivateApis );
export const trashPostAction = {
id: 'move-to-trash',
label: __( 'Move to Trash' ),
isPrimary: true,
icon: trash,
isEligible( { status } ) {
return status !== 'trash';
},
Expand Down Expand Up @@ -172,8 +170,6 @@ export function usePermanentlyDeletePostAction() {
() => ( {
id: 'permanently-delete',
label: __( 'Permanently delete' ),
isPrimary: true,
icon: trash,
supportsBulk: true,
isEligible( { status } ) {
return status === 'trash';
Expand Down Expand Up @@ -372,6 +368,8 @@ export function useEditPostAction() {
() => ( {
id: 'edit-post',
label: __( 'Edit' ),
isPrimary: true,
icon: edit,
isEligible( { status } ) {
return status !== 'trash';
},
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/page-pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,10 @@ export default function PagePages() {
const editPostAction = useEditPostAction();
const actions = useMemo(
() => [
editPostAction,
viewPostAction,
restorePostAction,
permanentlyDeletePostAction,
editPostAction,
postRevisionsAction,
trashPostAction,
],
Expand Down

0 comments on commit c97c26f

Please sign in to comment.