chore: lint

This commit is contained in:
dancingCycle 2024-02-16 16:09:44 +01:00
parent d1d19d4a9e
commit 5d8874eb66
4 changed files with 3 additions and 78 deletions

View File

@ -1,36 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import Dropdown from 'react-bootstrap/Dropdown';
export default function AgencySelect({
name, onChange, placeholder, rry, title,
}) {
if (rry.length > 0) {
return (
<Dropdown>
<Dropdown.Toggle id="dropdown-basic">
{placeholder}
</Dropdown.Toggle>
<Dropdown.Menu>
{rry.map((item) => (
<Dropdown.Item
eventKey={item.agency_id}
key={item.agency_id}
>
{item.agency_name}
</Dropdown.Item>
))}
</Dropdown.Menu>
</Dropdown>
);
}
return <p>Loading...</p>;
}
AgencySelect.propTypes = {
name: PropTypes.string,
onChange: PropTypes.func,
title: PropTypes.string,
placeholder: PropTypes.string,
rry: PropTypes.array,
};

View File

@ -1,39 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import Form from 'react-bootstrap/Form';
export default function AgencySelect({
name, onChange, placeholder, rry, title,
}) {
if (rry.length > 0) {
return (
<Form.Select
aria-label="select table entries per page"
name={name}
id={name}
className={name}
onChange={onChange}
placeholder={placeholder}
defaultValue={placeholder}
title={title}
type="text"
required
>
{rry.map((item) => (
<option key={item.agency_id} value={item.agency_id}>
{item.agency_name}
</option>
))}
</Form.Select>
);
}
return <p>Loading...</p>;
}
AgencySelect.propTypes = {
name: PropTypes.string,
onChange: PropTypes.func,
title: PropTypes.string,
placeholder: PropTypes.string,
rry: PropTypes.array,
};

View File

@ -38,6 +38,6 @@ export default function AgencySelect({ name, onChange, rry }) {
AgencySelect.propTypes = {
name: PropTypes.string,
onChange: PropTypes.func,
rry: PropTypes.array,
onChange: PropTypes.func,
rry: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]))
};

View File

@ -24,5 +24,5 @@ export default function TableEntries({ array }) {
}
TableEntries.propTypes = {
array: PropTypes.array,
array: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]))
};