-
Notifications
You must be signed in to change notification settings - Fork 417
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
Project movies Vera & Sofia #320
base: master
Are you sure you want to change the base?
Conversation
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.
Amazing job with this week’s project!! It’s so impressive that you managed to do this much in that short amount of time. It’s super cool and so inspiring! Pretty sure you exceeded the stretch goals by miles!
/ Camilla Cronqvist & Sammy Olsson
<div className="list-container" key={`${movie.vote_count}+2`}> | ||
<img key={`${movie.imdb_id}+3`} className="list-img" src={movie.poster_path ? `https://image.tmdb.org/t/p/w1280${movie.poster_path}` : ''} alt="movie poster" /> | ||
<div className="test" key={`${movie.imdb_id}+4`}> | ||
<Link |
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.
Think it would be nice if the movieposter was clickable and not only the Title.
Maybe this can be solved by putting the img-tag inside this <Link>
.
font-weight: 900; | ||
font-size: 25px; | ||
letter-spacing: 1px; | ||
animation: glowing 1300ms infinite; |
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.
Very cool use of animation!
return ( | ||
<div key={`${singleGenreMovie.id}+7`} className="list-container"> | ||
<img key={`${singleGenreMovie.id}+8`} className="list-img" src={singleGenreMovie.poster_path ? `${imageURL}/w1280/${singleGenreMovie.poster_path}` : ''} alt={singleGenreMovie.title} /> | ||
<div className="test" key={`${singleGenreMovie.id}+9`}> |
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.
A suggestion would be to change this className to something more descriptive.
@@ -1,9 +1,53 @@ | |||
import React from 'react'; | |||
import React, { useState, useEffect } 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.
Clean and easy to follow!
<Route path="/" element={<Home HomeArray={list} />} /> | ||
<Route path="/popular" element={<MovieList movies={list} />} /> | ||
<Route path="/popular/:movieId" element={<MovieDetails />} /> | ||
<Route path="/genre-list" element={<GenreList popularMovielist={list} />} /> | ||
<Route path="/genre-list/:genreId" element={<GenreMovieList />} /> | ||
<Route path="/genre-list/:genreId/:genreMovieId" element={<GenreMovieDetails />} /> | ||
<Route path="/404" element={<NotFound />} /> | ||
<Route path="*" element={<Navigate to="/404" replace />} /> |
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.
Love how you managed to grasp the concept of params in react and how you have used it in your paths.
|
||
export const Loader = () => ( | ||
<div className="loader-wrapper"> | ||
<img src="/vs-movies.png" alt="Logo" /> |
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.
Love that you made your own icon!
export const Home = ({ HomeArray }) => { | ||
const e = Math.floor(Math.random() * HomeArray.length); | ||
const f = Math.floor(Math.random() * HomeArray.length); | ||
const g = Math.floor(Math.random() * HomeArray.length); | ||
const h = Math.floor(Math.random() * HomeArray.length); | ||
|
||
return ( | ||
<div> | ||
<div className="image-wrapper home"> | ||
<img className="genre-background" src={HomeArray[e]?.backdrop_path ? `${imageURL}/w1280/${HomeArray[e].backdrop_path}` : ''} alt={HomeArray[e]?.title || ''} /> | ||
<img className="genre-background" src={HomeArray[f]?.backdrop_path ? `${imageURL}/w1280/${HomeArray[f].backdrop_path}` : ''} alt={HomeArray[f]?.title || ''} /> | ||
<img className="genre-background" src={HomeArray[g]?.backdrop_path ? `${imageURL}/w1280/${HomeArray[g].backdrop_path}` : ''} alt={HomeArray[g]?.title || ''} /> | ||
<img className="genre-background" src={HomeArray[h]?.backdrop_path ? `${imageURL}/w1280/${HomeArray[h].backdrop_path}` : ''} alt={HomeArray[h]?.title || ''} /> | ||
</div> | ||
<Link className="home-button" to="/popular">Start here</Link> | ||
</div> | ||
) | ||
} |
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.
Incredible how you made this using data from the api!
|
||
return ( | ||
<div className="details"> | ||
<img className="background-img" src={`${imageURL}/w1280/${details.backdrop_path}`} alt={details.id} /> |
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.
A suggestion here would be to use {movie.title}
for the alt-text to make it more accessible.
</a> | ||
<div className="details-text-wrapper"> | ||
<div className="details-row"> | ||
<p>{Math.floor(details.runtime / 60)}h {(details.runtime) % 60}min</p> |
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.
Great job with the run time data!
@@ -0,0 +1,4 @@ | |||
export const API_KEY = 'c4d0ef560a112a28bb0aa7ff2aa79464' |
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.
Great job using variables instead of the personal api-key!
No description provided.