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

refactor(StakingProductsCardGrid): update types, logic, and UI composition #11477

Merged

Conversation

TylerAPfledderer
Copy link
Contributor

@TylerAPfledderer TylerAPfledderer commented Oct 19, 2023

Description

This PR overhauls the structure of StakingProductsCardGrid.

  • Update types to favor of improved constraints
    • Created type signatures from the stakingProducts json data
    • Alter existing logic and types to match the new constraints
  • Code-split UI and logic for improved readability

Related Issue

N/A

@gatsby-cloud
Copy link

gatsby-cloud bot commented Oct 19, 2023

❌ ethereum-org-website-dev deploy preview failed

Your build failed. View the build logs.

Errors

Your plugins must export known APIs from their gatsby-node.

See https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/ for the list of Gatsby node APIs.

- The plugin [email protected] is using the API "unstable_shouldOnCreateNode" which is not a known API.

Some of the following may help fix the error(s):

- Rename "unstable_shouldOnCreateNode" -> "shouldOnCreateNode"
Your plugins must export known APIs from their gatsby-node.

See https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/ for the list of Gatsby node APIs.

- The plugin [email protected] is using the API "unstable_shouldOnCreateNode" which is not a known API.

Some of the following may help fix the error(s):

- Rename "unstable_shouldOnCreateNode" -> "shouldOnCreateNode"

@ethereum ethereum deleted a comment Oct 24, 2023
@ethereum ethereum deleted a comment Oct 24, 2023
@ethereum ethereum deleted a comment Oct 24, 2023
@ethereum ethereum deleted a comment Oct 24, 2023
@ethereum ethereum deleted a comment Oct 24, 2023
Copy link

netlify bot commented Feb 5, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 32ef36b
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/660752039cf26500084e3f35
😎 Deploy Preview https://deploy-preview-11477--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

This looks great @TylerAPfledderer, thanks! Much cleaner. Working well for me and think we can pull this in.

Left a question on StakingProductCard.tsx, but that doesn't have to block this.

Copy link
Member

Choose a reason for hiding this comment

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

Is it worth breaking this component apart as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wackerow Hmm I'm not sure. If I continue to break it down, I guess it would be making it's own useHook to abstract away the data and logic. I don't see the usefulness in splitting up the component structure; to me it's not big enough.

I don't think there is enough there right now to justify it unless there becomes an issue in readability.

@wackerow wackerow merged commit 1533dcb into ethereum:dev Mar 30, 2024
10 checks passed
@TylerAPfledderer TylerAPfledderer deleted the refactor/StakingProductsCardGrid branch March 30, 2024 02:30
@wackerow wackerow mentioned this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants