From 8d2521cb726160c07e7076a9dc1fb4f9e88f3b92 Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Fri, 12 Jul 2024 13:05:57 +0100 Subject: [PATCH] Revert "Pages: Trash view should default to table layout. (#63138)" This reverts commit 905b41d3185966fde04b78b6642fe55b99d62dd1. --- .../src/components/sidebar-dataviews/dataview-item.js | 4 ++-- .../src/components/sidebar-dataviews/default-views.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-dataviews/dataview-item.js b/packages/edit-site/src/components/sidebar-dataviews/dataview-item.js index 61779a5c459a10..0b5f93546875e5 100644 --- a/packages/edit-site/src/components/sidebar-dataviews/dataview-item.js +++ b/packages/edit-site/src/components/sidebar-dataviews/dataview-item.js @@ -29,7 +29,7 @@ export default function DataViewItem( { suffix, } ) { const { - params: { postType, layout, activeView: previousView }, + params: { postType, layout }, } = useLocation(); const iconToUse = @@ -41,7 +41,7 @@ export default function DataViewItem( { } const linkInfo = useLink( { postType, - layout: type !== 'list' || previousView === 'trash' ? type : layout, + layout, activeView, isCustom: isCustom ? 'true' : undefined, } ); diff --git a/packages/edit-site/src/components/sidebar-dataviews/default-views.js b/packages/edit-site/src/components/sidebar-dataviews/default-views.js index 7ce82c06715ae6..2b8a9de4c2262d 100644 --- a/packages/edit-site/src/components/sidebar-dataviews/default-views.js +++ b/packages/edit-site/src/components/sidebar-dataviews/default-views.js @@ -166,7 +166,6 @@ export function useDefaultViews( { postType } ) { icon: trash, view: { ...DEFAULT_POST_BASE, - type: LAYOUT_TABLE, filters: [ { field: 'status',