-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
- Main repository - https://github.com/MastersAcademy/fe-react-2024
- Design - https://www.figma.com/file/mRAOMdJiAsD8fHSVnYwUl9/React-web-page
- Branch name - task/07-api
Task Description: Implement Product Page with API Integration
Re-work a product page that fetches data from an API.
Swagger link : https://ma-backend-api.mocintra.com/docs#
The following requirements must be met:
-
Data Fetching:
- Use either
fetchoraxiosto request data from the API.
- Use either
-
Pagination:
- Implement pagination using query parameters.
-
Search Functionality:
- Implement a search feature for product titles using query parameters.
- The search should be triggered by a search button.
-
Category Filtering:
- Implement category filtering using query parameters.
- When the category or search term changes, the page should reset to the first page.
-
Loading Indicator:
- Display a spinner or a loading message while awaiting each API request.
-
Empty Response Handling:
- If the API returns an empty array (or an error occurs) for the given search conditions, display a message saying "No products" instead of leaving the screen blank.
Additional Task (Optional):
-
Mobile View:
- Hide pagination on mobile view and implement infinite scroll. This can be done manually or using a library of your choice.
-
Error Notification:
- Implement user notifications for errors. Preferably use
axiosinterceptors. You can use component libraries for toastr notifications.
- Implement user notifications for errors. Preferably use
Acceptance Criteria for 1
- Mentor is added to PR
- AC copied to PR description
- Link to deployed version is added to PR
-
ProductPagefetches data from the API using eitherfetchoraxios - Pagination is implemented using query parameters
- Search functionality is implemented using query parameters, with the search triggered by a search button
- Category filtering is implemented using query parameters, resetting the page to the first page on change
- A loading spinner or message is displayed while awaiting API requests
- If the API response is an empty array or an error occurs, a "No products" message is displayed instead of a blank screen
Acceptance Criteria for 1*
- Pagination is hidden on mobile view
- Infinite scroll is implemented for mobile view, either manually or using a library
- Error notifications are implemented using
axiosinterceptors, with component libraries for toastr notifications
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels