Nicely done.
We can add items to the cart and let's set up our cart page so we can display whether we have some items
in CART.
And if we do that and of course, we have the buttons and all the good stuff, and then we're going
to come back to the cart context and then coproducer and set up the rest of the functionality.
Before I forget, though, I would want to set up my function placeholders because again, I wouldn't
want to hop back and forth.
So let's just go with a remove item.
And again, I'm just going to be functions with no functionality.
Const remove item.
That's my function name.
I'll be looking for the ID.
And then as far as the function, the moment, it's not going to be anything in there and then we're
going to go with toggle amount.
Const and then toggle mount again, two parameters in this case at the end value, nothing is happening
and a function for now and we have also a clear court function.
So comment.
Where caught and consed leader khat and this is going to be the case where we're not looking for any
arguments, just going to be a function that invokes clear to court action.
So we have at the court currently in our value and we're passed.
And Muharrem also a powerful amount.
And of course, we have clear court.
Then we're going to navigate to the court page.
And in court, we're just going to be looking for a few values coming from our court context, so let's
go here we have court page and the way I set it up.
So have you got context?
That is, of course, my context.
I have a link and I have court content and page zero.
And essentially what I would want if there is nothing in the court, then we'll have one return.
And then if the court has some items, then we'll just set up everything here in this court content
component.
So let's start we're just getting our court from the context.
And we do that by invoking used court context.
Of course, we know that the moment court is an empty room.
Correct.
And we're just going to set up if court and then length is a less than one, then we're going to have
one return now.
Then there's going to be another one.
So in here, let's just go with return and I'll return my wrapper a lot right away.
Class for styling.
In this case, it's going to be page one hundred.
So we take up most of the page and inside of it we're going to have a div with a class of empty.
So that just means that there's no items in the car.
So we'll go with heading to your heart is empty.
And then I would want to set up the link that just navigates back to the product page so user can keep
on shopping.
So we'll say products and add a little bit of styling.
So class nine billion and then inside of it I'll just say fill it like so so we're safe.
And that is what we should say, because of course our cart is empty.
And as far as our second return, we're going to go with the main.
And then we'll set up our page here, remember, that was one of the components we set up previously
for the title just passing.
And we'll close it out and also want to set up my rapper, so I have the rapper now, in this case,
a rapper will have different class name the global one, and that one will be page.
So if I don't have any items, I would want to take up all the space.
And then if not, if I have already some items and if I have the page here, then of course I'm just
taking up less space for record.
And then instead of the rapper, we're going to go, like I said, with our cart content component.
So set up our cart content.
And at the moment, of course it should be empty, but we can go quickly and feel it.
So I'll pick any of the products and I'm just going to set up the amount.
And of course, you can see I have the page Hierro for Card and I have this card content and now it's
going to set up that card content component.