How to properly handle success page behaviors?
After Sign Up, I have to show a Sign Up Success page.
What I've tried so far:
1. The same route for the SignUp Form and SignUp Success Page so if they enter the /sign-up
route, Sign Up
form will show up.
In my SignUp Component, the view is dependent on the sign up status,
if signUp === success render Success Page
else render Sign Up Form
The problem with this is that there is a Sign Up
button in the header on the same page and if I click that, it remains in the success view
since the sign up and success shares one route.
<Button onClick={this.navigateToSignUp} />
2. Made another route for SignUp Success Page
I made a separate route for sign up success page (/sign-up-success) but I don't want the users to be able to manually access the route since it should only show after a successful registration.