Skip to content

Commit 16e8817

Browse files
fix: module import for apiFetch in Feedzy Block
1 parent aa126a3 commit 16e8817

File tree

2 files changed

+195
-91
lines changed

2 files changed

+195
-91
lines changed

js/FeedzyBlock/Editor.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import queryString from 'query-string';
1313
import Inspector from './inspector';
1414
import { __, sprintf } from '@wordpress/i18n';
15-
import { apiFetch as apiRequest } from '@wordpress/api-fetch';
15+
import apiFetch from '@wordpress/api-fetch';
1616
import { Component, Fragment } from '@wordpress/element';
1717
import {
1818
unescapeHTML,
@@ -128,7 +128,7 @@ class Editor extends Component {
128128
loading: true,
129129
});
130130

131-
apiRequest({
131+
apiFetch({
132132
path: `/feedzy/v1/feed?${url}`,
133133
method: 'POST',
134134
data: this.props.attributes,
@@ -163,7 +163,7 @@ class Editor extends Component {
163163
}
164164

165165
loadCategories() {
166-
apiRequest({ path: '/wp/v2/feedzy_categories?per_page=100' })
166+
apiFetch({ path: '/wp/v2/feedzy_categories?per_page=100' })
167167
.then((data) => {
168168
if (this.unmounting) {
169169
return data;

0 commit comments

Comments
 (0)