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

DataViews: export the view components as defaults #56677

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/edit-site/src/components/dataviews/dataviews.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import ViewList from './view-list';
import Pagination from './pagination';
import ViewActions from './view-actions';
import Filters from './filters';
import Search from './search';
import { ViewGrid } from './view-grid';
import { ViewSideBySide } from './view-side-by-side';
import ViewList from './view-list';
import ViewGrid from './view-grid';
import ViewSideBySide from './view-side-by-side';

// To do: convert to view type registry.
export const viewTypeSupportsMap = {
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/dataviews/view-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { useAsyncList } from '@wordpress/compose';
*/
import ItemActions from './item-actions';

export function ViewGrid( { data, fields, view, actions, getItemId } ) {
export default function ViewGrid( { data, fields, view, actions, getItemId } ) {
const mediaField = fields.find(
( field ) => field.id === view.layout.mediaField
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import ViewList from './view-list';

export function ViewSideBySide( props ) {
export default function ViewSideBySide( props ) {
// To do: change to email-like preview list.
return <ViewList { ...props } />;
}
Loading