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

wip: redirect #4

Closed
wants to merge 1 commit into from
Closed

wip: redirect #4

wants to merge 1 commit into from

Conversation

tmm
Copy link
Member

@tmm tmm commented Feb 13, 2024

  • redirect with button index
  • redirect with fc:frame:button:$idx:target

<Button action="post_redirect" value="apples">
<Button
action="post_redirect"
value="https://github.com/wevm/viem/blob/main/src/clients/createClient.ts"
Copy link
Member Author

@tmm tmm Feb 13, 2024

Choose a reason for hiding this comment

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

Setting value to URL to redirect to. Reason this is in .frame is so you can use dynamic content from context.

@tmm tmm force-pushed the tmm/feat-redirect branch 2 times, most recently from 8c1df45 to a9be757 Compare February 13, 2024 23:15
@@ -23,6 +23,7 @@ export function ButtonRoot({
<meta
property={`fc:frame:button:${index}`}
content={children}
data-type={action === 'post_redirect' ? 'redirect' : undefined}
Copy link
Member Author

Choose a reason for hiding this comment

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

Wonder if it makes sense to add a Button.Redirect component instead of overloading Button?

Copy link
Member

Choose a reason for hiding this comment

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

makes sense to me

@tmm tmm closed this Feb 14, 2024
@jxom jxom deleted the tmm/feat-redirect branch February 19, 2024 05:19
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