In this part, we are going to add the redirect function such that when they use a site up and when
it is successfully, you should be directed to the home page.
And if you remember me at the early stage, we have sent as calm and to as John Bolton's beach and neighborhood
temporary uses to a chat in the chat room.
Now, we already have a real youth there so we can set it as a user.
So now when we get back to the site up as.
Now we can copy these important U.S. contests and go to the same page and we page here, and we also
need to use the use Konstanz.
So we copy these and also page two of the CI a. page.
And also, we have to use contacts to use this U.S. contest, so we this lie and also a page to sign
a page.
So we go to the fetch functions and last time we already check whether there is errors and this time
we are going to check whether there is a process.
So if there is a use of property, then we are going to start to use the data.
Don't you use, sir?
And since we are going to redirect to the home page, so we have to import the direct component from
that, we add Adam.
And right before we turn to page.
We are going to check if a user exists, so if user, then we are going to redirect
redirect to the homepage.
So now we can go to the page.
Now we just randomly type something.
So, for example, we type Amy
Amy at Gmail dot com and then we type password and then click sign up.
Now it go to the homepage and now you can see.
Welcome, Amy.
And before we go to the room free and we try to send us a message.
So I am Amy.
But when you click on the send button.
You can see there's nothing happen on the inside.
And if you look at the arrows at the server, you can see there is some thing about a problem of the
user ID because.
It cannot be that any user ID and this is because when you look at the homepage, when you set aside
a.
Tom, the idea is like this, but now when you go to the Mongo DB and you can see that it actually to
be.
Underscore ID rather than ID, so.
There are two things that we need to fix is that we go to the chat page and right before the joint,
we need to change this to underscore ideia rather than idee and on the wendon and on rendering the message
component.
These also need to change because we actually do not have idee.
We just have.
Underscore the.
So we go to the front page again.
And then we go to a sign up, and then this time we lose our lives and end at chemo, and then again
we type some password.
We go to.
This has failed to fetch now we reached out to Safa.
And then we trixi up again, and then we go to roam free and now we type Hi.
Now you can see Ellers can pop out the message so everything's fine again.