Dear students,
Use your React Js Skills to build an app that can find the best Fried Chicken Restaurant in Baghdad
Please follow the steps below to complete the task:
-
Create a
RestaurantList
component representing a page that displays a list of fried chicken restaurants. Consider addingdata-testid='restaurants-list'
to the container elementdiv
of the restaurant list for testing purposes. -
Design a
RestaurantCard
component to showcase each restaurant's information. Include details like name, location, and a rating system (1-5 stars). Make sure to add these props attributes to target specific elements within the card for testing:data-testid='restaurant-name'
for the restaurant name element.data-testid='restaurant-location'
for the restaurant location element.data-testid='restaurant-rating'
for the rating element.
-
Build a
RestaurantForm
component with an input field for users to add new restaurants to the list. Clicking an "Add" button should seamlessly add the new restaurant. Include these data-testid attributes for testing:data-testid='restaurant-name-input'
for the name input field.data-testid='restaurant-location-input'
for the location input field.data-testid='range-input'
for the rating input field (assuming it's a range input).
-
Add a "Delete" button beside each restaurant card. This allows users to remove unwanted restaurants from the list.
-
Add a "Change Rate" button next to each restaurant card, allowing users to modify the rating.
-
When a user clicks on a specific restaurant card, the app should navigate to a dedicated
RestaurantDetails
component. This component will display detailed information about the chosen restaurant.
- Use state and props.
- Use es6 methods.
- Make the web app gives the user a fried chicken restaurant vibe.
- Make it responsive.
Please feel free to reach out if you have any questions or need further assistance.