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

Done #55

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Done #55

wants to merge 2 commits into from

Conversation

CJS2408
Copy link

@CJS2408 CJS2408 commented Nov 19, 2022

No description provided.

Comment on lines +19 to +20
const results = title.length ? filterMovies(title, movies) : movieSearch
setMovies(results)
Copy link

Choose a reason for hiding this comment

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

Should actually be

Suggested change
const results = title.length ? filterMovies(title, movies) : movieSearch
setMovies(results)
const results = title.length ? filterMovies(title, movies) : movies
setMovieSearch(results)

</label>
<section className="movies-index">
{
movies.map((movie) => {
Copy link

Choose a reason for hiding this comment

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

And then here you need to use the 'movieSearch' piece of state cause it's the one that you make changes (filter) to in your code.

Suggested change
movies.map((movie) => {
movieSearch.map((movie) => {

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