All right.
And once we have the CSS in place now let's set up NAV links as a separate component.
You see, we will use the same links in the small sidebar as well as the big one.
And even though technically we can import the same way the links in the big sidebar, it kind of makes
sense to just set up a separate component.
So first let's navigate to a components is going to be somewhat straightforward.
We're basically we'll just copy and paste over here.
It's not going to be NAV bar, it's going to be NAV links JS.
So that's my component.
And here I want to grab the links.
I want to grab the nav link from React Router Dom as well as the use dashboard context.
Since we'll also need an axis to toggle sidebar.
So first let's create this component.
And then.
I guess in this case we'll have to manually import because auto imports won't work since we'll copy
and paste.
So first let's go with import and then use dashboard context.
That's the first one.
Then we want to grab the links.
So links from utils.
And then lastly, we also want to grab the nav link.
So this is coming of course, from the React router dom.
Then we want to navigate to the small sidebar and pretty much take this entire div.
So this is where we'll import and set up the component.
Let's cut it out.
Then let's navigate back over here.
This is what we're returning.
And now let's just check.
Whether we have everything.
So we have the links.
Okay, we imported that, but we don't have the toggle sidebar correct.
And therefore we'll go with use dashboard context.
We will invoke it and we'll set it equal to and we'll right away the structure toggle sidebar.
Now I'll also grab the user, even though at the moment we won't use it because later, once we set
up the admin functionality, actually we'll hide a link.
Based on the user role.
Again, all of that is coming up.
Let's save it over here.
Let's navigate to a small sidebar.
And we want to grab over here the nav links component.
So nav links.
And yes, we're not setting up any kind of import export in the index since we're only going to use
it over here.
And if everything is correct.
We should see the same result again.
The bonus right now is the fact that we can use the same NAV links component in the big sidebar, which
is actually something we're going to build next.