Skip to content

Commit

Permalink
Revert "Replace string literals with store definitions in block-libra…
Browse files Browse the repository at this point in the history
…ry (#31933)"

This reverts commit b122f24.
  • Loading branch information
ellatrix authored May 19, 2021
1 parent 4e42e00 commit 05adf37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/block-library/src/categories/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
VisuallyHidden,
} from '@wordpress/components';
import { useInstanceId } from '@wordpress/compose';
import { useSelect, store as dataStore } from '@wordpress/data';
import { useSelect } from '@wordpress/data';
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
import { __ } from '@wordpress/i18n';
import { pin } from '@wordpress/icons';
Expand All @@ -27,7 +27,7 @@ export default function CategoriesEdit( {
const selectId = useInstanceId( CategoriesEdit, 'blocks-category-select' );
const { categories, isRequesting } = useSelect( ( select ) => {
const { getEntityRecords } = select( coreStore );
const { isResolving } = select( dataStore );
const { isResolving } = select( 'core/data' );
const query = { per_page: -1, hide_empty: true };
return {
categories: getEntityRecords( 'taxonomy', 'category', query ),
Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/embed/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import classnames from 'classnames';
*/
import { __, _x, sprintf } from '@wordpress/i18n';
import { useState, useEffect, Platform } from '@wordpress/element';
import { useDispatch, useSelect, store as dataStore } from '@wordpress/data';
import { useDispatch, useSelect } from '@wordpress/data';
import { useBlockProps } from '@wordpress/block-editor';
import { store as coreStore } from '@wordpress/core-data';
import { View } from '@wordpress/primitives';
Expand Down Expand Up @@ -64,7 +64,7 @@ const EmbedEdit = ( props ) => {

const [ url, setURL ] = useState( attributesUrl );
const [ isEditingURL, setIsEditingURL ] = useState( false );
const { invalidateResolution } = useDispatch( dataStore );
const { invalidateResolution } = useDispatch( 'core/data' );

const {
preview,
Expand Down

0 comments on commit 05adf37

Please sign in to comment.