-
Notifications
You must be signed in to change notification settings - Fork 29
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
Filter y test #9
base: main
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.
NOTA:
El PR no debrias apuntarlo al repo de laboratoria si no a tu propia rama mian
movies-app/src/App.module.css
Outdated
text-align: center; | ||
font-size: 3rem; | ||
text-shadow: 1px 1px 2px pink; | ||
} */ |
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.
debes dejar en todo los archivos una linea al final sin espacios
|
||
|
||
|
||
|
||
|
||
|
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.
estas lieneas no son necesarias
onChange(genre); | ||
navigate(`?genre=${(genre)}`); |
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.
te invitaria a replantear esta parte es decir es una contradiccion navegar y actulaizar un estado
ya que si navegas se repinta toda la pagina por lo que setear el estado pierde el sentido
tu componente padre deberia reaccionar al cambio en la url
width: 90%; | ||
height: auto; | ||
} | ||
} |
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.
mismo caso que arriba linea sin espacio al final
import { GenreFilter } from "./FilterGenre"; | ||
import OrderFilter from "./OrderApi"; | ||
|
||
// export function MoviesGrid() { |
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.
Son necesarios estos comentarios?
const fetchData = () => { | ||
console.log("Current Page:", currentPage); | ||
console.log("Total Pages:", totalPages); | ||
const apiUrl = search | ||
? `/search/movie?query=${search}` | ||
: `/discover/movie?with_genres=${selectedGenre}&include_adult=false&include_video=false&language=en-US&page=${currentPage}&sort_by=${sortBy}`; | ||
|
||
get(apiUrl) | ||
.then((data) => { | ||
console.log("API Response:", data); | ||
setMovies(data.results); | ||
setTotalPages(data.total_pages); | ||
}) | ||
.catch((error) => { | ||
console.error("Error fetching data:", error); | ||
}); | ||
}; |
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.
la funcion se debe declarar antes de usarla es decir sube este codigo arriba de la linea 193
get("/movie/" + movieId).then(data => { | ||
setMovie(data) | ||
|
||
}) |
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.
Que pasa si el request falla?
No description provided.