From 301e28dfb2decf2937176acd3edef46a39832172 Mon Sep 17 00:00:00 2001 From: Vladyslav Dalechyn Date: Wed, 6 Nov 2024 02:52:49 +0200 Subject: [PATCH] docs: fix miniapp page (#516) --- site/pages/concepts/mini-apps.mdx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/site/pages/concepts/mini-apps.mdx b/site/pages/concepts/mini-apps.mdx index c6449cbb..0b76b9f4 100644 --- a/site/pages/concepts/mini-apps.mdx +++ b/site/pages/concepts/mini-apps.mdx @@ -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: [] +app + .frame((c) => { + return c.res({ + image: '...', + intents: [] + }) }) -}) + // 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