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

code optimization, extract common code hooks usePrevious #3573

Merged
merged 4 commits into from
Feb 7, 2022

Conversation

nuoyz
Copy link
Contributor

@nuoyz nuoyz commented Jan 14, 2022

Description

code optimization: usePrevious code implementations exist in multiple files; Easy maintenance, common code implementation

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #???

@nuoyz nuoyz requested a review from a team as a code owner January 14, 2022 14:44
@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2022

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@nuoyz
Copy link
Contributor Author

nuoyz commented Jan 14, 2022

I have read the CLA Document and I hereby sign the CLA

@gantunesr gantunesr added the community Issues or PRs opened by the MM community label Jan 14, 2022
Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Can you refactor the hook code to TypeScript?

@gantunesr gantunesr added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) No QA Needed Apply this label when your PR does not need any QA effort. Code Impact - Low Minor code change that can safely applied to the codebase labels Jan 14, 2022
@nuoyz
Copy link
Contributor Author

nuoyz commented Jan 14, 2022

ok

@nuoyz nuoyz requested a review from gantunesr January 14, 2022 16:07
@nuoyz nuoyz requested a review from gantunesr January 14, 2022 16:24
app/components/Nav/Main/index.js Outdated Show resolved Hide resolved
app/components/UI/Notification/index.js Outdated Show resolved Hide resolved
@nuoyz nuoyz requested a review from gantunesr January 14, 2022 16:41
@nuoyz
Copy link
Contributor Author

nuoyz commented Jan 14, 2022

what do i need to do next?

refactor the hook code to TypeScript

fix lint

delete usePrevious.js, use ts
@rickycodes
Copy link
Member

rickycodes commented Jan 14, 2022

@nuoyz I've taken the liberty of squashing your commits (and properly attributing them). you're PR should be good to merge now as the CLA requirement is now satisfied. :)

@gantunesr gantunesr removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jan 17, 2022
@andrepimenta andrepimenta changed the base branch from develop to main February 4, 2022 18:51
@gantunesr gantunesr merged commit f9640f3 into MetaMask:main Feb 7, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2022
@gantunesr gantunesr removed the Code Impact - Low Minor code change that can safely applied to the codebase label Feb 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Issues or PRs opened by the MM community No QA Needed Apply this label when your PR does not need any QA effort.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants