Skip to content

Commit

Permalink
docs: fix miniapp page (#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
dalechyn authored Nov 6, 2024
1 parent 34252ee commit 301e28d
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions site/pages/concepts/mini-apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,24 @@ import { Frog, Button } from 'frog'

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

app.frame((c) => {
return c.res({
image: '...',
intents: [<Button.MiniApp href="https://link-to-my-mini-app"/>]
app
.frame((c) => {
return c.res({
image: '...',
intents: [<Button.MiniApp action="/miniapp"/>]
})
})
})
// or .composerAction
.miniApp(
"/miniapp",
(c) => c.res({ title: "Mini-App", url: `${process.env.VERCEL_URL ?? 'http://localhost:3000'}/your-mini-app-page` }),
{
name: "Mini-App",
description: "Mini-App",
imageUrl: "",
icon: "log",
},
);
```

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

0 comments on commit 301e28d

Please sign in to comment.