-
Notifications
You must be signed in to change notification settings - Fork 38
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
Luke Sikuade Project Cinema #24
base: master
Are you sure you want to change the base?
Conversation
@@ -1,48 +1,20 @@ | |||
# Project Cinema | |||
## Cinema App |
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
}); | ||
|
||
const refineUrl = search => { | ||
let pageNum = 1; |
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.
Wouldn't pageNum be reset to 1 every time this function is called this making pageNum++ redundant
|
||
const header = document.querySelector("header"); | ||
header.appendChild(next); | ||
next.addEventListener("click", function(event) { |
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 would better to implement the click handler using delegation to avoid having to reset it each time function is called
const review = await getReview(movieID); | ||
//Currently not operating as intended. | ||
let mobileClose = ""; | ||
screen.width < 700 ? (mobileClose = "Close") : (mobileClose = "x"); |
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.
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
const movieData = await response.json(); | ||
|
||
const movie = movieData.results.find(item => { | ||
if (item.title === filmObject.Title) { |
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.
Since find callback expects a boolean, this could be simplified to return item.title === filmObject.Title
} | ||
} | ||
|
||
// function youMayAlsoLike(genre, actors, director, writer){ |
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.
Commented out code can removed to avoid clutter
No description provided.