Skip to content

Commit d7e34aa

Browse files
committed
Resolve the options via the helper instead
1 parent 2cca836 commit d7e34aa

File tree

1 file changed

+3
-1
lines changed
  • packages/block-library/src/latest-posts

1 file changed

+3
-1
lines changed

packages/block-library/src/latest-posts/edit.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import {
5454
DEFAULT_EXCERPT_LENGTH,
5555
} from './constants';
5656
import { useToolsPanelDropdownMenuProps } from '../utils/hooks';
57+
import { useOrderByOptions } from '../query/utils';
5758

5859
/**
5960
* Module Constants
@@ -87,7 +88,6 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
8788
postsToShow,
8889
order,
8990
orderBy,
90-
orderByOptions,
9191
categories,
9292
selectedAuthor,
9393
displayFeaturedImage,
@@ -161,6 +161,8 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
161161
]
162162
);
163163

164+
const orderByOptions = useOrderByOptions( 'post' );
165+
164166
// If a user clicks to a link prevent redirection and show a warning.
165167
const { createWarningNotice } = useDispatch( noticeStore );
166168
const showRedirectionPreventedNotice = ( event ) => {

0 commit comments

Comments
 (0)