diff --git a/src/App.js b/src/App.js index 76d8f09..1276b4f 100644 --- a/src/App.js +++ b/src/App.js @@ -46,9 +46,6 @@ class App extends Component { } _handleSearch = query => { - if (!query) { - return; - } axios.get(`https://swapi.co/api/people/?search=${query}`) .then(response => this.setState({options: response.data.results})) .catch(error => { diff --git a/src/Components/People.js b/src/Components/People.js index 24bfebb..17cc2c4 100644 --- a/src/Components/People.js +++ b/src/Components/People.js @@ -3,10 +3,6 @@ import Person from './Person' class People extends Component { - static defaultProps = { - data: [] - } - render() { return (