-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Cinema Project #20
base: master
Are you sure you want to change the base?
Conversation
src/components/App.js
Outdated
this.setState({movieresults: content.Search, moviestotal: content.totalResults}) | ||
} | ||
else { | ||
this.setState({noresults: "empty"}); |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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
src/components/Preview.js
Outdated
@@ -0,0 +1,16 @@ | |||
import React from 'react'; |
There was a problem hiding this comment.
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
src/components/Search.js
Outdated
<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} /> |
There was a problem hiding this comment.
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
Great work |
I think I forgot to submit a pull request to my weekend project - apologies.