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

Filter y test #9

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

Conversation

jazminmontenegro
Copy link

No description provided.

Copy link

@Freihart512 Freihart512 left a 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

text-align: center;
font-size: 3rem;
text-shadow: 1px 1px 2px pink;
} */

Choose a reason for hiding this comment

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

Comment on lines +34 to +39






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

Comment on lines 8 to 9
onChange(genre);
navigate(`?genre=${(genre)}`);

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;
}
}

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() {

Choose a reason for hiding this comment

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

Son necesarios estos comentarios?

Comment on lines 202 to 218
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);
});
};

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

Comment on lines +12 to +15
get("/movie/" + movieId).then(data => {
setMovie(data)

})

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?

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