1 00:00:00,300 --> 00:00:00,880 Nicely done. 2 00:00:00,900 --> 00:00:08,610 We can add items to the cart and let's set up our cart page so we can display whether we have some items 3 00:00:08,610 --> 00:00:09,090 in CART. 4 00:00:09,390 --> 00:00:15,660 And if we do that and of course, we have the buttons and all the good stuff, and then we're going 5 00:00:15,660 --> 00:00:21,660 to come back to the cart context and then coproducer and set up the rest of the functionality. 6 00:00:21,960 --> 00:00:27,870 Before I forget, though, I would want to set up my function placeholders because again, I wouldn't 7 00:00:27,870 --> 00:00:29,480 want to hop back and forth. 8 00:00:29,850 --> 00:00:32,280 So let's just go with a remove item. 9 00:00:32,520 --> 00:00:35,970 And again, I'm just going to be functions with no functionality. 10 00:00:35,970 --> 00:00:38,370 Const remove item. 11 00:00:38,760 --> 00:00:39,950 That's my function name. 12 00:00:40,170 --> 00:00:41,560 I'll be looking for the ID. 13 00:00:42,000 --> 00:00:47,820 And then as far as the function, the moment, it's not going to be anything in there and then we're 14 00:00:47,820 --> 00:00:49,830 going to go with toggle amount. 15 00:00:51,170 --> 00:00:59,810 Const and then toggle mount again, two parameters in this case at the end value, nothing is happening 16 00:00:59,810 --> 00:01:05,020 and a function for now and we have also a clear court function. 17 00:01:05,420 --> 00:01:06,260 So comment. 18 00:01:07,390 --> 00:01:15,460 Where caught and consed leader khat and this is going to be the case where we're not looking for any 19 00:01:15,580 --> 00:01:20,880 arguments, just going to be a function that invokes clear to court action. 20 00:01:21,250 --> 00:01:25,940 So we have at the court currently in our value and we're passed. 21 00:01:26,290 --> 00:01:29,680 And Muharrem also a powerful amount. 22 00:01:30,130 --> 00:01:33,070 And of course, we have clear court. 23 00:01:33,470 --> 00:01:36,280 Then we're going to navigate to the court page. 24 00:01:37,460 --> 00:01:45,950 And in court, we're just going to be looking for a few values coming from our court context, so let's 25 00:01:45,950 --> 00:01:51,230 go here we have court page and the way I set it up. 26 00:01:51,530 --> 00:01:53,330 So have you got context? 27 00:01:53,480 --> 00:01:54,700 That is, of course, my context. 28 00:01:54,710 --> 00:01:59,630 I have a link and I have court content and page zero. 29 00:02:00,110 --> 00:02:06,110 And essentially what I would want if there is nothing in the court, then we'll have one return. 30 00:02:06,710 --> 00:02:14,720 And then if the court has some items, then we'll just set up everything here in this court content 31 00:02:14,720 --> 00:02:15,230 component. 32 00:02:15,480 --> 00:02:19,280 So let's start we're just getting our court from the context. 33 00:02:19,820 --> 00:02:23,120 And we do that by invoking used court context. 34 00:02:23,630 --> 00:02:26,540 Of course, we know that the moment court is an empty room. 35 00:02:26,780 --> 00:02:27,200 Correct. 36 00:02:27,560 --> 00:02:34,070 And we're just going to set up if court and then length is a less than one, then we're going to have 37 00:02:34,070 --> 00:02:35,510 one return now. 38 00:02:35,630 --> 00:02:37,000 Then there's going to be another one. 39 00:02:37,760 --> 00:02:44,450 So in here, let's just go with return and I'll return my wrapper a lot right away. 40 00:02:44,450 --> 00:02:46,490 Class for styling. 41 00:02:46,490 --> 00:02:48,830 In this case, it's going to be page one hundred. 42 00:02:48,830 --> 00:02:55,670 So we take up most of the page and inside of it we're going to have a div with a class of empty. 43 00:02:56,090 --> 00:02:59,120 So that just means that there's no items in the car. 44 00:02:59,210 --> 00:03:03,440 So we'll go with heading to your heart is empty. 45 00:03:03,830 --> 00:03:11,030 And then I would want to set up the link that just navigates back to the product page so user can keep 46 00:03:11,030 --> 00:03:11,600 on shopping. 47 00:03:11,990 --> 00:03:16,040 So we'll say products and add a little bit of styling. 48 00:03:16,040 --> 00:03:21,850 So class nine billion and then inside of it I'll just say fill it like so so we're safe. 49 00:03:21,860 --> 00:03:27,380 And that is what we should say, because of course our cart is empty. 50 00:03:27,590 --> 00:03:31,130 And as far as our second return, we're going to go with the main. 51 00:03:32,010 --> 00:03:37,470 And then we'll set up our page here, remember, that was one of the components we set up previously 52 00:03:38,430 --> 00:03:39,690 for the title just passing. 53 00:03:41,410 --> 00:03:48,490 And we'll close it out and also want to set up my rapper, so I have the rapper now, in this case, 54 00:03:48,490 --> 00:03:53,080 a rapper will have different class name the global one, and that one will be page. 55 00:03:53,500 --> 00:03:57,700 So if I don't have any items, I would want to take up all the space. 56 00:03:57,700 --> 00:04:02,950 And then if not, if I have already some items and if I have the page here, then of course I'm just 57 00:04:02,950 --> 00:04:06,220 taking up less space for record. 58 00:04:06,490 --> 00:04:13,200 And then instead of the rapper, we're going to go, like I said, with our cart content component. 59 00:04:13,450 --> 00:04:15,490 So set up our cart content. 60 00:04:15,730 --> 00:04:20,220 And at the moment, of course it should be empty, but we can go quickly and feel it. 61 00:04:20,260 --> 00:04:25,570 So I'll pick any of the products and I'm just going to set up the amount. 62 00:04:25,570 --> 00:04:33,310 And of course, you can see I have the page Hierro for Card and I have this card content and now it's 63 00:04:33,310 --> 00:04:36,700 going to set up that card content component.