Skip to content

Conversation

@LemonyDesign
Copy link

I think I forgot to submit a pull request to my weekend project - apologies.

this.setState({movieresults: content.Search, moviestotal: content.totalResults})
}
else {
this.setState({noresults: "empty"});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might better to set {movieresults: []}. Then you can check the length of the array to make sure you have movies to display. Saves you having to use an additional property in state

receiveResults() {
this.setState({noresults: noresults})
}
receiveMovies() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this method does not get called from anywhere

@@ -0,0 +1,16 @@
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this component is not in use and can be removed

<section className="search">
<form onSubmit={this.handleSubmit} className="search__form" id="search">
<div className="search__input-wrapper">
<input onChange={this.handleChange} className={searchInput} type='text' name="search" placeholder="Enter film title" autoComplete="search" value={this.props.query} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Great to see query being used from props

@dmitrigrabov
Copy link
Contributor

Great work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants