Skip to content

Commit

Permalink
nit: Button.MiniApp to use action prop
Browse files Browse the repository at this point in the history
  • Loading branch information
dalechyn committed Nov 6, 2024
1 parent 0ca090f commit 8d70c93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function ButtonLink({
}

export type ButtonMiniAppProps = ButtonProps & {
href: string
action: string
prompt?: boolean
}

Expand All @@ -101,7 +101,7 @@ export function ButtonMiniApp({
children,
// @ts-ignore - private
index = 1,
href,
action,
prompt,
}: ButtonMiniAppProps) {
return [
Expand All @@ -113,7 +113,7 @@ export function ButtonMiniApp({
<meta property={`fc:frame:button:${index}:action`} content="link" />,
<meta
property={`fc:frame:button:${index}:target`}
content={`https://warpcast.com/~/composer-action?url=${encodeURIComponent(href)}${prompt ? '&view=prompt' : ''}`}
content={`https://warpcast.com/~/composer-action?url=${encodeURIComponent(action)}${prompt ? '&view=prompt' : ''}`}
/>,
] as unknown as HtmlEscapedString
}
Expand Down

0 comments on commit 8d70c93

Please sign in to comment.