Skip to content

Luke Sikuade Project Cinema#24

Open
ljsikuade wants to merge 9 commits intoconstructorlabs:masterfrom
ljsikuade:master
Open

Luke Sikuade Project Cinema#24
ljsikuade wants to merge 9 commits intoconstructorlabs:masterfrom
ljsikuade:master

Conversation

@ljsikuade
Copy link
Copy Markdown

No description provided.

Comment thread README.md
@@ -1,48 +1,20 @@
# Project Cinema
## Cinema App
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice

Comment thread index.js
});

const refineUrl = search => {
let pageNum = 1;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wouldn't pageNum be reset to 1 every time this function is called this making pageNum++ redundant

Comment thread index.js

const header = document.querySelector("header");
header.appendChild(next);
next.addEventListener("click", function(event) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would better to implement the click handler using delegation to avoid having to reset it each time function is called

Comment thread index.js
const review = await getReview(movieID);
//Currently not operating as intended.
let mobileClose = "";
screen.width < 700 ? (mobileClose = "Close") : (mobileClose = "x");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This could better written as const mobileClose = screen.width < 700 ? "Close" : "x". A ternary is an expression and returns a value which we can assign to output variable

Comment thread index.js
const movieData = await response.json();

const movie = movieData.results.find(item => {
if (item.title === filmObject.Title) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since find callback expects a boolean, this could be simplified to return item.title === filmObject.Title

Comment thread index.js
}
}

// function youMayAlsoLike(genre, actors, director, writer){
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Commented out code can removed to avoid clutter

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