Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundan styled component
Browse files Browse the repository at this point in the history
Pavel Makarichev committed Mar 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d6cd1b0 commit 8ce0ce2
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
@@ -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();
});

@@ -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();

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
@@ -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;
@@ -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}
@@ -54,7 +53,7 @@ const ControlledSelect: React.FC<ControlledSelectProps> = ({
<FormError>
<ErrorMessage name={name} />
</FormError>
</StyledControlledSelect>
</div>
);
};

0 comments on commit 8ce0ce2

Please sign in to comment.