Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages data view: Update quick-actions #59551

Merged
merged 11 commits into from
Mar 21, 2024
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
Loading