CORS is Sucks a big longer p.... product

This commit is contained in:
2024-10-30 02:15:26 +04:00
parent c88bf296a9
commit 233386b4fd
5 changed files with 75 additions and 37 deletions

View File

@@ -4,7 +4,7 @@ import classes from './styles.module.scss';
type SelectorProps = {
field: string;
handleSetValue: (field: string, value: string) => void;
list: string[];
list: string[] | number[];
};
const Selector: FC<SelectorProps> = ({ field, handleSetValue, list }) => {
@@ -16,12 +16,6 @@ const Selector: FC<SelectorProps> = ({ field, handleSetValue, list }) => {
handleSetValue(field, value);
};
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value;
setInputValue(value);
handleSetValue(field, value);
};
return (
<div className={classes.selectorContainer}>
<select
@@ -38,13 +32,6 @@ const Selector: FC<SelectorProps> = ({ field, handleSetValue, list }) => {
</option>
))}
</select>
<input
type="text"
className={classes.input}
value={inputValue}
onChange={handleInputChange}
placeholder="Or type your own"
/>
</div>
);
};