Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants