Skip to content

Commit

Permalink
Remove @wordpress/element
Browse files Browse the repository at this point in the history
  • Loading branch information
widoz committed Dec 28, 2023
1 parent f2eb479 commit b69ab8d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@wordpress/components": "~23.1.0",
"@wordpress/compose": "^6.23.0",
"@wordpress/core-data": "~6.12.0",
"@wordpress/element": "^5.23.0",
"@wordpress/i18n": "~4.24.0",
"classnames": "^2.3.2",
"immutable": "~4.3.0",
Expand Down
4 changes: 1 addition & 3 deletions sources/js/src/components/composite-posts-post-types.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type EntitiesSearch from '@types';
import { OrderedSet, Set } from 'immutable';
import React, { JSX } from 'react';

import { useState, useEffect } from '@wordpress/element';
import React, { JSX, useState, useEffect } from 'react';

import { usePostsOptionsStorage } from '../hooks/use-posts-options-storage';
import { orderSelectedOptionsAtTheTop } from '../utils/order-selected-options-at-the-top';
Expand Down
4 changes: 1 addition & 3 deletions sources/js/src/hooks/use-posts-options-storage.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import EntitiesSearch from '@types';
import { Reducer, Dispatch } from 'react';

import { useReducer } from '@wordpress/element';
import { Reducer, Dispatch, useReducer } from 'react';

import { makeInitialState } from '../storage/posts/initial-state';
import { reducer } from '../storage/posts/reducer';
Expand Down
7 changes: 1 addition & 6 deletions tests/js/unit/components/composite-posts-post-types.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import EntitiesSearch from '@types';
import { OrderedSet } from 'immutable';
import React from 'react';

import { describe, it, expect, jest } from '@jest/globals';
import { describe, it, expect } from '@jest/globals';

import { render, act } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
Expand All @@ -11,11 +11,6 @@ import { CompositePostsPostTypes } from '../../../../sources/js/src/components/c
import { PostTypeSelect } from '../../../../sources/js/src/components/post-type-select';
import { PostsSelect } from '../../../../sources/js/src/components/posts-select';

jest.mock('@wordpress/element', () => ({
useState: React.useState,
useEffect: React.useEffect,
}));

describe.skip('CompositePostsPostTypes', () => {
/**
* This test want to ensure it is possible to select a post type.
Expand Down

0 comments on commit b69ab8d

Please sign in to comment.