Skip to content

Instantly share code, notes, and snippets.

@etherik
Last active March 6, 2024 01:02
Show Gist options
  • Save etherik/41450fff77957b1d5ecf0e71770a1111 to your computer and use it in GitHub Desktop.
Save etherik/41450fff77957b1d5ecf0e71770a1111 to your computer and use it in GitHub Desktop.
Minimal example for invisible Button.Transaction
import { serveStatic } from '@hono/node-server/serve-static'
import { Button, Frog, TextInput } from 'frog'
export const app = new Frog({
// Supply a Hub API URL to enable frame verification.
// hubApiUrl: 'https://api.hub.wevm.dev',
})
app.use('/*', serveStatic({ root: './public' }))
app.frame('/', (c) => {
return c.res({
image: (
<div style={{ color: 'white', display: 'flex', fontSize: 60 }}>
Perform a transaction
</div>
),
intents: [
<TextInput placeholder="Value (ETH)" />,
<Button.Transaction value="Mint">Mint</Button.Transaction>,
],
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment