Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USER STORY: Redirect users #76

Closed
7 tasks done
blahosyl opened this issue Aug 5, 2024 · 0 comments
Closed
7 tasks done

USER STORY: Redirect users #76

blahosyl opened this issue Aug 5, 2024 · 0 comments
Assignees
Labels
e: ux profiles Epic: UX for Profiles p: should have Priority: High value but not crucial

Comments

@blahosyl
Copy link
Owner

blahosyl commented Aug 5, 2024

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

  1. Logged-in Users are redirected from the SignInForm to the home page
  2. Logged-in Users are redirected from the SignUpForm to the home page
  3. Logged-out Visitors are redirected from the TaskCreateForm to the Signin page

Tasks

  • create useRedirect hook in hooks/
  • use hook in SignInForm:
    • import useRedirect
    • pass useRedirect the prop "loggedIn"
    • redirect user to the home page: history.goBack();
  • use hook in SignUpForm:
    • import useRedirect
    • pass useRedirect the prop "loggedIn"
  • use hook in TaskCreateForm:
    • import useRedirect
    • pass useRedirect the prop "loggedOut"
    • in useRedirect.js, change logged out path to history.push("/signin/"); instead of history.push("/");

Test Acceptance Criteria

  • Log in & go to /signin. You should be redirected to the home page.
  • Log in & go to /signup. You should be redirected to the home page.
  • Log out & go to /tasks/create. You should be redirected to the signin page (/signin).
@blahosyl blahosyl self-assigned this Aug 5, 2024
@blahosyl blahosyl added this to the Sprint 2: Profiles & UX milestone Aug 5, 2024
@blahosyl blahosyl moved this to In Progress in Task Manager Aug 5, 2024
blahosyl added a commit that referenced this issue Aug 5, 2024
- create `useRedirect` hook in `hooks/`
- use hook in `SignInForm`:
  - import `useRedirect`
  - pass `useRedirect` the prop `"loggedIn"`
  - redirect user to the home page: `history.goBack();`
@blahosyl blahosyl added p: should have Priority: High value but not crucial e: ux profiles Epic: UX for Profiles labels Aug 5, 2024
blahosyl added a commit that referenced this issue Aug 5, 2024
  - import `useRedirect` into `SignUpForm`
  - pass `useRedirect` the prop `"loggedIn"` in `SignUpForm`
blahosyl added a commit that referenced this issue Aug 5, 2024
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("/");`
@blahosyl blahosyl moved this from In Progress to Done in Task Manager Aug 5, 2024
@blahosyl blahosyl closed this as completed by moving to Done in Task Manager Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e: ux profiles Epic: UX for Profiles p: should have Priority: High value but not crucial
Projects
Status: Done/Won't do
Development

No branches or pull requests

1 participant