mirror of
https://github.com/owncast/owncast.git
synced 2025-11-02 20:23:29 +08:00
code cleanup
This commit is contained in:
@ -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]);
|
||||||
|
|
||||||
|
|||||||
@ -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' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user