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

fix: Memoize currency search modal config #7152

Conversation

memoyil
Copy link
Collaborator

@memoyil memoyil commented Jun 16, 2023

🤖 Generated by Copilot at 6d1d9c8

Summary

📝🚀🚚

The pull request enhances the performance and user experience of the CurrencySearchModal component by memoizing its configuration and moving it to a more appropriate app folder. It also simplifies the useState hook for the duration state in the useLockedPool hook.

We search for the currency of doom
We memoize the modal of despair
We simplify the state of our fate
We optimize the code of our resistance

Walkthrough

  • Optimize the rendering of the config object in the CurrencySearchModal component by wrapping it in a useMemo hook with the dependencies t and prevView (link, link, link, link)
  • Move the CurrencySearchModal component from apps/web/src/components/SearchModal to apps/aptos/components/SearchModal as part of a refactoring of the project structure to separate the web and aptos apps (link)
  • Simplify the useState hook for the duration state in the useLockedPool hook by using the defaultDuration value directly instead of a function that returns it (link)

@changeset-bot
Copy link

changeset-bot bot commented Jun 16, 2023

⚠️ No Changeset found

Latest commit: 5d64aae

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jun 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aptos-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2023 0:00am
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2023 0:00am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
blog ⬜️ Ignored (Inspect) Jul 22, 2023 0:00am
bridge ⬜️ Ignored (Inspect) Jul 22, 2023 0:00am
uikit ⬜️ Ignored (Inspect) Jul 22, 2023 0:00am

@vercel
Copy link

vercel bot commented Jun 16, 2023

@memoyil is attempting to deploy a commit to the PancakeSwap Team on Vercel.

A member of the Team first needs to authorize it.

@chefjackson
Copy link
Collaborator

Close for now as it's stale. Feel free to reopen after updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants