Skip to content

Commit

Permalink
Rename singularly hte PostTypeSelect Component
Browse files Browse the repository at this point in the history
  • Loading branch information
widoz committed Aug 13, 2023
1 parent c5b37e6 commit 98ee82b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ interface PostTypeSelectProps
extends EntitiesSearch.PostTypeSelect,
SelectPropsWithoutOptions {}

export function PostTypesSelect(
props: PostTypeSelectProps
): JSX.Element | null {
export function PostTypeSelect(props: PostTypeSelectProps): JSX.Element | null {
const value = props.options.find((option) => option.value === props.value);

return (
Expand Down
2 changes: 1 addition & 1 deletion sources/js/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './components/post-types-select';
export * from './components/post-type-select';

export * from './hooks/use-entity-records';
export * from './hooks/use-query-viewable-post-types';
Expand Down
4 changes: 2 additions & 2 deletions tests/js/unit/components/post-types-select.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { render } from '@testing-library/react';

import { faker } from '@faker-js/faker';

import { PostTypesSelect } from '../../../../sources/js/src/components/post-types-select';
import { PostTypeSelect } from '../../../../sources/js/src/components/post-type-select';

jest.mock('react-select', () => () => <div className="react-select" />);

Expand All @@ -23,7 +23,7 @@ describe('Post Types Select Component', () => {
});
}

const { asFragment } = render(<PostTypesSelect options={options} />);
const { asFragment } = render(<PostTypeSelect options={options} />);

expect(asFragment()).toMatchSnapshot();
});
Expand Down

0 comments on commit 98ee82b

Please sign in to comment.