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: Refresh user name in Nav Bar after first or last name is changed #82

Closed
1 task done
blahosyl opened this issue Aug 5, 2024 · 0 comments
Closed
1 task done
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 Logged-in User,

I want to see my updated name in the NavBar automatically,

so that I do not have to refresh the page after changing it

Acceptance Criteria

  1. When a Logged-in User changes their firstname or lastname in their profile, the change should be reflected in the Nav Bar without refreshing the page.

Tasks

  • add firstname and lastname to the PUT request in ProfileEditForm:
    try {
      const { data } = await axiosReq.put(`/profiles/${id}/`, formData);
      setCurrentUser((currentUser) => ({
        ...currentUser,
        profile_image: data.image,
        // also update firstname and lastname of currentUser
        profile_firstname: data.firstname,
        profile_lastname: data.lastname,
      }));
      history.goBack();
    } 
@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 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
add firstname and lastname to the PUT reques
@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