You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- create `useRedirect` hook in `hooks/`
- use hook in `SignInForm`:
- import `useRedirect`
- pass `useRedirect` the prop `"loggedIn"`
- redirect user to the home page: `history.goBack();`
from TaskCreateForm to Signin page
- in `TaskCreateForm`, import `useRedirect`
- in `TaskCreateForm`, pass `useRedirect` the prop `"loggedOut"`
- in `useRedirect.js`, change logged out path to `history.push("/signin/");` instead of `history.push("/");`
As a Visitor or Logged-in User,
I want to be redirected away from pages that are not relevant to me,
so that my user journey can be expedited
Acceptance Criteria
Tasks
useRedirect
hook inhooks/
SignInForm
:useRedirect
useRedirect
the prop"loggedIn"
history.goBack();
SignUpForm
:useRedirect
useRedirect
the prop"loggedIn"
TaskCreateForm
:useRedirect
useRedirect
the prop"loggedOut"
useRedirect.js
, change logged out path tohistory.push("/signin/");
instead ofhistory.push("/");
Test Acceptance Criteria
/signin
. You should be redirected to the home page./signup
. You should be redirected to the home page./tasks/create
. You should be redirected to the signin page (/signin
).The text was updated successfully, but these errors were encountered: