Last active
March 6, 2024 01:02
-
-
Save etherik/41450fff77957b1d5ecf0e71770a1111 to your computer and use it in GitHub Desktop.
Minimal example for invisible Button.Transaction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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