-
Notifications
You must be signed in to change notification settings - Fork 18
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
Edit mentor team async await #236
Edit mentor team async await #236
Conversation
|
Name | Link |
---|---|
🔨 Latest commit | 4ef496c |
d24bde9
to
4ef496c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!. Thanks for getting this ticket closed out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM--just a small note for the future. I might look at the backlog and see if we have a place for tech debt to add it to (I'm new to Trello)
onChange={(e) => setTeamNumber(e.target.value)} | ||
></TextField> | ||
</Stack> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have limited knowledge of this app (first time actually looking at this code) but this looks good to me. I do want to note that this component is getting lorrrge and is probably a good candidate for a refactor in the future--we could definitely abstract some of those API calls, especially if they're used in other components.
Pull Request Template
1. Targeted Issue
(The first step to a good solution is knowing the problem. Please link the issue here.)
Issue #... or
Ticket #...
https://trello.com/c/v1vEtFrr/140-add-team-number-to-the-mentors-profile
2. Overview of Solution
(You've put in the hard work, now's your chance to tell us about it. What's your solution in a nutshell?)
ProfileMentor.js now has a teamNumber state, which is displayed above the ProfileBasicInfo.
In EditProfile.js, the mentorinfo axios call now handles the teamNumber data, and the teamNumber form field is no longer tied to the isMentee state. Also, the useEffect hook and editProfile function now use async-await to handle promises.
3. Tools Used
(Share the tools, libraries, or techniques you've used in your solution.)
Promises in EditProfile.js now use async-await. The editProfile function bundles the 2 patch requests into a single Promise using Promise.all(), allowing them to be run concurrently.
4. Testing Strategy
(No code is complete without tests. Outline what you've tested and how.)
Testing hasn't been implemented on the frontend yet (plus I don't really know how to test React code). Locally run the front and back ends, and edit a part of a mentor's profile.
5. Future Implications
(Let's anticipate potential effects of your changes. Are there any potential issues down the line?)
If any future contributor is not used to using async await, this will hopefully serve as a nice example.
6. Screenshots
(A picture is worth a thousand words. Include screenshots of your changes if relevant.)
7. Code Reviewers
(Who else is in the loop? Mention your team or other contributors here.)
@emilyflo @GitLukeW @nzeager
Before you go...
Big high-fives for your incredible pull request! We're thrilled to have you as a contributor! Our team will dig into your proposed changes and give you some feedback or merge them if they're good to go. Your contributions mean the world to us!