code cleanup

This commit is contained in:
dorj222
2023-01-25 17:06:39 +01:00
parent 1993eebc9f
commit 7920ec17a9
2 changed files with 1 additions and 3 deletions

View File

@ -61,7 +61,6 @@ export const TextField: FC<TextFieldProps> = ({
// if an extra onChange handler was sent in as a prop, let's run that too. // if an extra onChange handler was sent in as a prop, let's run that too.
if (onChange) { if (onChange) {
const val = type === TEXTFIELD_TYPE_NUMBER ? e : e.target.value; const val = type === TEXTFIELD_TYPE_NUMBER ? e : e.target.value;
// console.log('val: ', val, 'fieldname: ', fieldName);
if (fieldName === 'adminPassword' && regex.test(val)) { if (fieldName === 'adminPassword' && regex.test(val)) {
setHasChanged(true); setHasChanged(true);
@ -74,7 +73,6 @@ export const TextField: FC<TextFieldProps> = ({
}; };
useEffect(() => { useEffect(() => {
// console.log('value: ', value);
form.setFieldsValue({ adminPassword: value }); form.setFieldsValue({ adminPassword: value });
}, [value]); }, [value]);

View File

@ -102,7 +102,7 @@ const AddKeyForm = ({ setShowAddKeyForm, setFieldInConfigState, streamKeys, setE
}, },
]} ]}
> >
<Input placeholder="def456" onChange={handleInputChange} /> <Input onChange={handleInputChange} />
</Item> </Item>
<Item <Item
style={{ width: '60%', marginRight: '5px' }} style={{ width: '60%', marginRight: '5px' }}