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
Shopping System
2
°
Select al category-
Orders History
Title
Category
Price
Rate
Action
Cart
Essence Mascara Lash
beauty
1809
300
Your cart is empty!
Add To Cart
Eyeshadow Palette
beauty
19.99
3.33
Add Cart
Powder Cater
54.00
467
Add To Cart
Red Lipstick
beauty
12.99
467
Add to Can
fd Nail Polish
8.90
487
Add to Cart
Calvin Klein CK One
fragrances
49.99
3.00
Add To Cart
Chanel Coco Noir Eau De
fragrances
120.99
100
MOTO Cat
Dior Jadore
fragrances
89.99
433
Add To Cart
+ 78%
Close