And with our car functionality complete I would want to head over to a header or not bar.
Call it Tower you'd like.
So we have a header and we have a number.
And I would want to have the card items right where each and every time we do something with our card
whether that's remove the item or add more amount then of course it's gonna be displayed of how many
items we have in the card currently we're just displaying the link.
And that's where we're gonna head over to our Navarre which is within the header and then we're going
to import a component with a value of a log in.
Oh I'm sorry.
No I'm not logging link.
We're going to look for the card link.
My apologies.
Logging link is going to be for logging functionality.
The cart Link is gonna be displaying how many times we haven't a card because like I said currently
we only have a link to a card page.
So let's change that around.
Let's import.
Now again we're looking for cart link.
Well that is the name of our component and then it is sitting within the cart folder.
So within the cart folder we're looking for the cart link component.
And once we have the component we're going to flip this around.
It's not going to be a list item anymore.
We're just going to have a cart look like.
So let's close out the component and currently of course we're gonna have a hello from Cartland because
we haven't set up anything within the cart link.
So we're going to head over back to cart link and we're going to import first a link from reactive order
down.
So let's look for a link from react road or none.
OK.
Awesome.
And then we're going to look for the cart context because the cart items.
So the amount of items that haven't occurred are obviously within the cart contact and we're going to
import.
Cart are context then obviously that is coming from where.
Well from our cart.
So let's look for context and then within a context we're looking for the cart.
Jess and then also of course we would need around the use context.
So in order to access our cart items we're gonna have to use used context.
So first let's destructor them.
So cart items and we're structuring from react then we have use context and then we just need to provide
a cart context once we have access to the cart items we're just gonna rewrite a return a bit differently
where we're gonna say that we're returning a day of with a class name of cart link cart link Carne trainer
like so and then within a day we're gonna have first a link which is going to navigate to a cart page.
So that part is going to stay exactly the same.
So we're navigating to a cart then the text is going to be cart within the link.
And lastly there's gonna be a span that shows how many items we have this plan is going to have a class
of cart link and we're looking for total total online we're going to access our cart items.
So let's make sure we access cart items variable in the moment we say that now we're going to have a
logging link and right next to it we have a cart link and as I'm increasing the items course my items
within the cart link are also gonna crease if I'm gonna add more products then also my amount is going
to go up.
So let me add this guy and now I have nine items in the cart.