Now we'll be adding those pop ups that are going to appear on our screen whenever there is an action.
For example, if I just copy wind and pop up the toast, that should appear.
We'll be adding them.
And as you might recall, that we have already installed one dependency into our application if I just
go to a package adjacent file.
So React justifies the and being package that we have installed that is going to help us to create an
application.
So for that purpose, head to your inputs, headers and import toast.
So important.
And that is from a reactive departure, right?
So let's import area, those from the if I.
Now, once time important, you also need to base this particular statement that says that.
Import reactors, the finest reactors, the TSA, so basically this is the surface properties of our
toes.
Now we're redefining a toast function and let's just call it not.
So right below your copy method will be creating our toast method.
So let me just drag it down.
Now let's create a contest and testify.
But perhaps let's name it, and they have it's notice.
So basically, these are notifications.
No, this is going to be an out of function and it is going to take up two parameters.
The one is going to be the message and there's going to be has error or error.
Maybe there is going to specify if we have any sort of error.
So this message then again, is supposed to be an error function.
Now we'll be creating a notice matter, so if error is true.
So if our error is true, what they want is that initially we want the errors to be false.
We did not want them and do so allow assign it to a value false.
Now, if the error is true, what we want is that we want toast.
The error.
And it is going to take up our message, and once it has taken our message, we are going to restructure
certain data, so create two collaborators, and once they are done, we'll give it a position.
Of course, Bush and top senators or.
So basically, we're defining the position where we want our toes to appear.
So.
It should be in all caps.
Position.
The top.
Center all to one zero to find the position now in neutral divine order plus after how much time do
you want to close it?
So we want to close it after every five seconds, so give it five thousand.
Right, after all, too closely with the hide progress was so I'd progress bar.
Should be close to violence because you want a protest to be shown.
And after that, progress bar will give it a one click so close on.
Click when they click on closer to close, so they should be quick to drop and after closer and will
be giving it pause on hover.
So these properties are self explanatory.
So War Zone have a.
Which is going to be called a true.
And after this, we're going to do with druggable.
Which is going to be called to.
And after this progress, we're going to put it on the undefined.
All these should be common.
So after this undefined, what we want is that will be closing it, so semicolon.
Oh, come on.
And now let's close it now.
This is the case, then this in particular when there is some sort of error.
What if there is not?
So if there is no such error, then we that else.
Let's put up a statement.
Then what they want to you on the toast.
And this time message.
And this is going to have the same district, so give it the structure, the property and possession
is going to be poison on top two and two and false.
So let me just copy this and let's paste it over here.
So we have a position tostop center.
We have our auto close and five we have high progress by close to files.
We have on closer clicking calls to drop us on how very close to druggable true and focus on the phone.
So now we have set it up a toast.
Now we need to configure it.
So let me just configure our toast, not even configurator.
So let's put a toast.
The configure.
All right, so we are excited about those.
Now we need to call it right.
So the first place are going to call our toast, whether or not this function is going to be in our
alert.
So here I then having an alert will be calling a notice.
So let's call a.
Narratives and apart from this, we also pass it, giving it another property that is going to be there,
they're going to be true.
So now this is the first place where we're calling our notice after this be.
Now we are going to create another method inside a function that is going to help us to copy and call
an order.
So let's see if this function is to so that we can copy our data so we will be making this particular
function and once call it is going to call our copy.
It is going to color copy from Playbook.
So let's call a function.
Copy from Clipboard.
All right, so after we have called this, we'll be calling on voters.
So notice.
And we're passing it a message that your messages.
Your password?
Has been copied.
So this is a message.
Now we need to assign this copy matter to a button, and that button is none other than a button generate
password, so give it an click.
And first, the value of a handle copy.
And a copy.
So, yeah, we have created a function now, let's take a look at.