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

make task #2706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

make task #2706

wants to merge 1 commit into from

Conversation

cyberte4
Copy link

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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


Great job on implementing the task requirements! 🎉 Your code is well-structured and meets the core functionality as expected. While there are a few areas to double-check, such as ensuring the TextField component handles the onChange prop correctly and verifying the moviesFromServer import, these are minor and do not detract from the overall functionality. Keep up the excellent work, and consider these points for future improvements! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

@@ -2,15 +2,30 @@ import './App.scss';
import { MoviesList } from './components/MoviesList';
import { NewMovie } from './components/NewMovie';
import moviesFromServer from './api/movies.json';
import { useState } from 'react';

Choose a reason for hiding this comment

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

Ensure that the moviesFromServer import on line 4 is correctly pointing to the JSON file and that the file exists. This is crucial for initializing the state with the movie data.

return (
<div className="page">
<div className="page-content">
<MoviesList movies={moviesFromServer} />
<MoviesList movies={movies} />

Choose a reason for hiding this comment

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

Verify that the MoviesList component is correctly implemented to handle the movies prop. It should expect an array of movies and render them appropriately.

</div>
<div className="sidebar">
<NewMovie /* onAdd={(movie) => {}} */ />
<NewMovie onAdd={handleAddMovie} />

Choose a reason for hiding this comment

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

Ensure that the NewMovie component is correctly implemented to handle the onAdd prop. It should call this function with a new movie object when a movie is added.

value=""
onChange={() => {}}
value={title}
onChange={handleTitleChange}

Choose a reason for hiding this comment

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

Ensure that the TextField component is correctly implemented to handle the onChange prop. It should call the provided function with the new value of the input field.


<div className="field is-grouped">
<div className="control">
<button
type="submit"
data-cy="submit-button"
className="button is-link"
disabled={!ifFormValid()}

Choose a reason for hiding this comment

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

The disabled attribute for the submit button is correctly set based on the form validation function ifFormValid. Ensure that the ifFormValid function covers all necessary validation checks.

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