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: refactor DemoOptions component #1623

Merged
merged 8 commits into from
Nov 19, 2024
Merged

Conversation

dschlabach
Copy link
Contributor

What changed? Why?
This PR refactors the DemoOptions component away from a switch/case and to a mapping pattern. I think this is appropriate for 2 reasons:

  1. Mapping is easier to read and maintain without stepping through nested logic.
  2. (more importantly) it will enable the next playground feature, the ability to copy "share links". This requires us to know which options are associated with which components, and this is much easier to do with an accessible mapping available.

Notes to reviewers

How has it been tested?

Base automatically changed from dms/refactor-playground to main November 14, 2024 20:00
Copy link

vercel bot commented Nov 14, 2024

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

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 7:24pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 7:24pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 15, 2024 7:24pm

@dschlabach dschlabach merged commit 5a41b79 into main Nov 19, 2024
17 checks passed
@dschlabach dschlabach deleted the dms/refactor-playground-1 branch November 19, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants