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 active component logic in playground #1622

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

dschlabach
Copy link
Contributor

What changed? Why?
Logic for determining active component and rendering said component is clunky. This PR moves the architecture to a mapping of components and removes the renderActiveComponent function for improved readability.

Notes to reviewers

How has it been tested?

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 14, 2024 6:48pm

@dschlabach dschlabach merged commit 9c28af7 into main Nov 14, 2024
17 checks passed
@dschlabach dschlabach deleted the dms/refactor-playground branch November 14, 2024 20:00
}
const ActiveComponent = activeComponent
? activeComponentMapping[activeComponent]
: null;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: could eliminate your null check below and just return a component that renders null

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.

4 participants