Skip to content

Commit

Permalink
Remove redundan styled component
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Makarichev committed Mar 6, 2024
1 parent d6cd1b0 commit 8ce0ce2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/ACLPage/List/__test__/List.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('ACLList Component', () => {

it('header has button for create ACL', () => {
renderComponent();
const button = screen.getByText('+ Create ACL');
const button = screen.getByText('Create ACL');
expect(button).toBeInTheDocument();
});

Expand All @@ -70,7 +70,7 @@ describe('ACLList Component', () => {
describe('after acl button click', () => {
it('form is in the document', async () => {
renderComponent();
const button = screen.getByText('+ Create ACL');
const button = screen.getByText('Create ACL');
await userEvent.click(button);
const form = screen.queryByTestId('aclForm');
expect(form).toBeInTheDocument();
Expand Down

This file was deleted.

5 changes: 2 additions & 3 deletions frontend/src/components/common/Select/ControlledSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { InputLabel } from 'components/common/Input/InputLabel.styled';
import { ErrorMessage } from '@hookform/error-message';

import Select, { SelectOption } from './Select';
import { StyledControlledSelect } from './ControlledSelect.styled';

interface ControlledSelectProps {
name: string;
Expand All @@ -28,7 +27,7 @@ const ControlledSelect: React.FC<ControlledSelectProps> = ({
const id = React.useId();

return (
<StyledControlledSelect>
<div>
{label && <InputLabel htmlFor={id}>{label}</InputLabel>}
<Controller
name={name}
Expand All @@ -54,7 +53,7 @@ const ControlledSelect: React.FC<ControlledSelectProps> = ({
<FormError>
<ErrorMessage name={name} />
</FormError>
</StyledControlledSelect>
</div>
);
};

Expand Down

0 comments on commit 8ce0ce2

Please sign in to comment.