- Given an
array
of objects similar to:
[
{
"id": 1,
"name": "Example Name 1",
"description": "Example description 1",
"price": 998,
"imageUrl": "https://picsum.photos/seed/picsum/300/200",
"cartCount": 0
},
{
"id": 2,
"name": "Example Name 2",
"description": "Example description 2",
"price": 938,
"imageUrl": "https://picsum.photos/seed/picsum/300/200",
"cartCount": 3
}
]
-
Display each product in the
Array
. -
Each product should have an option to
Add
orRemove
it from the cart. -
Somewhere on the page the total
number
of products in thecart
should be displayed. -
The general mock up of the UI screen is attached below: