-
Notifications
You must be signed in to change notification settings - Fork 396
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
Extract the dropdown menu from VRF v2 cost calculator #1446
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
33705f3
to
8a164f3
Compare
8a164f3
to
b81d4fb
Compare
311a179
to
d12ba33
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.
Good job on this ! I cleaned some components and used the network queryString unused in the dropdown component to get the last network selected on load and on reload of the page. I left a comment about this. Let me know when I can merge !
8fbaf11
to
1a0a86b
Compare
…st selected network on reload
…cted for the first time + Added condition to render costTable only when network is defined
fa261a9
to
5d80d00
Compare
…it#1446) * extract-dropdown * remove mainChainName useState * improve useQueryString hook * improve getNetworkFromQueryString * return null * Remove useless DropdownMenu component + fill dropdown input with latest selected network on reload * Refactor CostTable component to fix bugs in getting state values * Fix bug where API call was made with undefined or null input * Add additional states to reducer state to have a single source of truth * Implement throttle for API calls * Remove logging * WIP to fix API call rate limit bug * Fixed issue where loading text did not appear when a network was selected for the first time + Added condition to render costTable only when network is defined * Use env variables to get VRF calculator API url + clean code * Remove comments in methodCheckbox component * Fix type errors in CostTable.test.ts file * Empty commit * account test * new email set * empty commit * Empty commit * Use env variable in costTable test file * Remove env variable use * fix lint issue * Update src/features/data/chains.ts --------- Co-authored-by: Yacine Benichou <[email protected]> Co-authored-by: Yacine Benichou <[email protected]> Co-authored-by: Yacine Benichou <[email protected]>
Relates issues
Relates #1423
Description
The dropdown menu is extracted from the VRF v2 cost calculator in order to make it reusable in other components.
Changes
queryString
parameter to networks data, in order to easier create and access search parametersgetNetworkFromQueryString
function, in order to get chain network object from search parametersuseQueryString
, in order to get information about selected chain and network from urluseQueryString
to use URLSearchParams instead of query-string, because URLSearchParams is built-in