Fix React Component tests
This commit is contained in:
parent
4bac47249b
commit
808344eecf
15 changed files with 620 additions and 494 deletions
|
@ -7,14 +7,9 @@ import PropTypes from 'prop-types';
|
|||
class BlacklistForm extends React.Component {
|
||||
|
||||
render() {
|
||||
let value = this.props.value;
|
||||
if (!value) {
|
||||
value = [];
|
||||
}
|
||||
|
||||
return <div className='form-blacklist-form'>
|
||||
{
|
||||
value.map((url, index) => {
|
||||
this.props.value.map((url, index) => {
|
||||
return <div key={index} className='form-blacklist-form-row'>
|
||||
<input data-index={index} type='text' name='url'
|
||||
className='column-url' value={url}
|
||||
|
@ -55,4 +50,8 @@ BlacklistForm.propTypes = {
|
|||
onChange: PropTypes.func,
|
||||
};
|
||||
|
||||
BlacklistForm.defaultProps = {
|
||||
value: [],
|
||||
};
|
||||
|
||||
export default BlacklistForm;
|
||||
|
|
Reference in a new issue