OK, so now let's go ahead and create the desserts component, which it is responsible for showing us
the desserts inside the browser.
Or let's go inside the components folder and here we will create the results dark G6.
So.
The salt or cheese or peculiar depends on you.
So it gives you an empty file.
So now here we will import our basic code, the boilerplate code with the.
Our IFC, which is a relaxed, functional component within export.
And here we will import some of the things like the use effect we'll be needing.
So here is the use effect.
It was a fact.
Okay, so next, we'll import the used location from the reactor algorithms that we use.
Location.
From the crowd, third on next will include the the top layer now we.
I have not yet installed the React player.
No, let me show you what is there and why we actually need it, so we will go to our browser and now
we'll close this.
We don't need any more inside the NBN.
We will see the backup player.
I will tell you why we need it, actually.
And.
So this is just for playing the video.
So as I already told you in the introduction of video that we will have the fields for the all like
the results will be for all images, news and for the videos of other videos.
We are going to install the three player.
Nothing else.
So that is all what I thought about this.
So we will import, I will install this will copy this thing and the next we will go to our.
Co-Director and hear inside the terminal will open our terminal by control, plus Bektic, and here
we will go to our projects, and that is the Google search.
And here we will paste that command and we will install this player by hitting enter on this particular
command.
So I have already installed the appropriate part you haven't because you're not.
So you can just in started by this command.
It will take just a few seconds and it will be installed.
So once you have installed, we will come back to decoding and let me minimized the terminal.
And now we will start.
With the coding part, so we will import the React Player React player.
So real clear from.
The player, yeah.
So next, we will.
Our global context here, so that will be the import.
Not just that will be the U.S.
State context.
From.
Thought clash, then the context that it will be the state context for later, so this we will import
and next we will go to the loading and we will import the loading from here that there will be the loading.
And this we are importing from.
Assists on the loading.
Yes.
So from looting, we have imported and next, now we will export.
We don't export and basically already function inside this function.
But this resort function?
Now we will go and create some of the things like the contextual.
So here we will see concert.
And here we will see the results like whatever we are clear inside the global context.
So it will be results and results, basically.
Next, we'll have the loading artist loading.
Loading Next, after loading, we'll have the results.
So cut reserves after that, we'll be having this search term.
So search.
And.
OK.
And now this would be equal to the U.S.
State context.
So use the context.
Basically, we are getting all the data.
OK, so use state and context.
Next, we will send the location.
So after this, there will be the constant call as the location, so it will be gone.
Look.
A vacation and this is equal to location and use location.
And after this, what we'll do is we'll make use of the use effect function or the use effect hook.
So that will be used.
Fact.
Tired of this, it expects to function and it will be something like this.
So inside the use effect, we will give the if statements to like if that is.
If.
That is a search term, so search zone.
So then this is the empty string.
And after that, we'll have this early braces and now inside of this, we will have the location of
the location thought, but name is equally critical to the IS spot, which is videos.
Reduce.
And if that happens.
So what is that?
So if that videos happens, basically, you know, I put the wrong thing, you're.
OK.
Oh, there will be the else.
So there would be the end.
But after this videos, we will have, yeah, we will get the videos right.
So we will get the results of get results.
And inside this, there will be the tactics and directives that would be these search.
So it's less Q is equal to its taller sign and start of this search.
Don't search.
And after this date and signed and the number will be 40.
So 40 search results should be there.
So next, moving on, we will create something more.
So after this, there will be the L statement like if this is not true, then what we need to do.
So there will be the L statement and inside the LS then will be the get resolved and we will have the
same thing basically.
So we will just copy this thing from here.
But there will be some changes.
So inside of this will paste is basically here.
We don't need this account.
We'll just eat this thing from here and we'll write the videos and inside the get results of the LS
block, there will be some changes to.
I will delete this basically from this part.
So from this part, I will remove this and even add a dollar sign.
And then there will be this early faces inside of this field, right?
The location or part names or location, Port Botany, then this.
Everything will be executed.
Okay, so we are on with the final statement now this is there and this is there and one more.
This is there.
So now we will give the dependency area like when this everything should be executed.
So whenever there is a change in these search term and there is the change in the location or part name
a name for these functions or these logic will be executed.
So next, we will move on to the other name, like what functionalities should be taken care of accordingly,
according to the path, names and all.
So that is the thing which we are going to do now next.
So we will write the Switch statement and we will write them in the next video.
So we'll see that in the next video.