Skip to content

Commit

Permalink
replaces withAPIData with withSelect for API request/call
Browse files Browse the repository at this point in the history
  • Loading branch information
jomurgel committed Sep 21, 2018
1 parent 9970bc3 commit c102e41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blocks/recent-posts/recent-posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const {
Spinner,
ToggleControl,
Toolbar,
withAPIData,
} = wp.components;
const { withSelect } = wp.data;
const { __ } = wp.i18n;
const { decodeEntities } = wp.htmlEntities;

Expand Down Expand Up @@ -286,7 +286,7 @@ class RecentPostsBlock extends Component {
}
}

export default withAPIData( ( props ) => {
export default withSelect( ( props ) => {
const { postsToShow, order, orderby, taxonomies } = props.attributes;
const decodedTaxonomies = taxonomies ? JSON.parse( taxonomies ) : {};

Expand Down

0 comments on commit c102e41

Please sign in to comment.