Question 1 (4 marks) - Fetch and Display Products
☑ Kizspy. me ate a component that retrieves and displays all products from the API endpoint:
GET
http://localhost: 9999/products
Requirements:
.
Component is routed at URL:
http://localhost:3000 (0 points if incorrect the URL)
.
Design the correct layout.
• Display the Title, Category, Price, and Rate (average rating of reviews) in a table.
.
Include a dropdown list box to filter products by category, with categories returned
from the API.
Figure 1: Fetch and display products
|
Zoom
→ O
bat
Shopping System
2
°
Select al category-
Orders History
Title
Category
Price
Rate Action
Cart
beauty
909
300
Add To Cart
Your cart is empty!
Eyeshadow Palette
beauty
19.99
3.33
Add To Cart
Powder Canter
beauty
54.09
467
Add To Cart
Red List
beauty
12.99
467
Add S Can
fad Nail Polish
487
AddToCart
beauty
Calvin Klein CK One
hagrances
49.99
3.00
Add To Cart
Charal Coco Noir Eau De
fragrances
12099
100
Add To Cart
Dior Jadore
fragances
89.99
433
Add to Cart
+ 78%
Close