Skip to content

Commit 301e28d

Browse files
authored
docs: fix miniapp page (#516)
1 parent 34252ee commit 301e28d

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

site/pages/concepts/mini-apps.mdx

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,24 @@ import { Frog, Button } from 'frog'
2828

2929
export const app = new Frog({ title: 'Frog Frame' })
3030

31-
app.frame((c) => {
32-
return c.res({
33-
image: '...',
34-
intents: [<Button.MiniApp href="https://link-to-my-mini-app"/>]
31+
app
32+
.frame((c) => {
33+
return c.res({
34+
image: '...',
35+
intents: [<Button.MiniApp action="/miniapp"/>]
36+
})
3537
})
36-
})
38+
// or .composerAction
39+
.miniApp(
40+
"/miniapp",
41+
(c) => c.res({ title: "Mini-App", url: `${process.env.VERCEL_URL ?? 'http://localhost:3000'}/your-mini-app-page` }),
42+
{
43+
name: "Mini-App",
44+
description: "Mini-App",
45+
imageUrl: "",
46+
icon: "log",
47+
},
48+
);
3749
```
3850

3951
You can also add `prompt` param to the props to hint the App Client to render the Mini-App without opening

0 commit comments

Comments
 (0)