Fix eslint errors in listings/elements/title.jsx (#4496) [ci skip]

This commit is contained in:
José Chaves Neto 2019-10-23 15:21:47 -03:00 committed by Mac Siri
parent fe5e8f6a8d
commit 9e6c64fa83
2 changed files with 8 additions and 8 deletions

View file

@ -23,8 +23,7 @@ export class GithubRepos extends Component {
.then(json => {
this.setState({ repos: json });
})
.catch(error => {
console.log(error);
.catch(() => {
this.setState({ erroredOut: true });
});
};

View file

@ -3,9 +3,11 @@ import { h } from 'preact';
const domId = 1;
const Title = ( { onChange, defaultValue }) => (
const Title = ({ onChange, defaultValue }) => (
<div className="field">
<label className="listingform__label" htmlFor={domId}>Title</label>
<label className="listingform__label" htmlFor={domId}>
Title
</label>
<input
type="text"
className="listingform__input"
@ -19,12 +21,11 @@ const Title = ( { onChange, defaultValue }) => (
onInput={onChange}
/>
</div>
)
);
Title.propTypes = {
onChange: PropTypes.func.isRequired,
defaultValue: PropTypes.string.isRequired,
}
};
export default Title;
export default Title;