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
fetch or axios to request data from the API.
-
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
axios interceptors. You can use component libraries for toastr notifications.
Acceptance Criteria for 1
Acceptance Criteria for 1*
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:
fetchoraxiosto request data from the API.Pagination:
Search Functionality:
Category Filtering:
Loading Indicator:
Empty Response Handling:
Additional Task (Optional):
Mobile View:
Error Notification:
axiosinterceptors. You can use component libraries for toastr notifications.Acceptance Criteria for
1ProductPagefetches data from the API using eitherfetchoraxiosAcceptance Criteria for
1*axiosinterceptors, with component libraries for toastr notifications