From ab1a969659f3d9d170f2f463ab6e51a286f3973f Mon Sep 17 00:00:00 2001 From: Vladyslav Dalechyn Date: Mon, 22 Jul 2024 00:05:21 +0300 Subject: [PATCH] fix: templates (#425) * fix: templates to have `title` defined in `Frog` constructor * chore: changesets --- .changeset/silent-drinks-brush.md | 5 +++++ templates/bun/src/index.tsx | 1 + templates/cloudflare-worker/src/index.tsx | 1 + templates/default/src/index.tsx | 1 + templates/next/app/api/[[...routes]]/route.tsx | 1 + templates/node/src/index.tsx | 1 + templates/vercel/api/index.tsx | 1 + 7 files changed, 11 insertions(+) create mode 100644 .changeset/silent-drinks-brush.md diff --git a/.changeset/silent-drinks-brush.md b/.changeset/silent-drinks-brush.md new file mode 100644 index 00000000..cf9868b7 --- /dev/null +++ b/.changeset/silent-drinks-brush.md @@ -0,0 +1,5 @@ +--- +"create-frog": patch +--- + +Fixed an issue with absent `title` in templates that led to a typing error. diff --git a/templates/bun/src/index.tsx b/templates/bun/src/index.tsx index c421c47c..f5eed34c 100644 --- a/templates/bun/src/index.tsx +++ b/templates/bun/src/index.tsx @@ -7,6 +7,7 @@ import { serveStatic } from 'frog/serve-static' export const app = new Frog({ // Supply a Hub to enable frame verification. // hub: neynar({ apiKey: 'NEYNAR_FROG_FM' }), + title: 'Frog Frame', }) app.frame('/', (c) => { diff --git a/templates/cloudflare-worker/src/index.tsx b/templates/cloudflare-worker/src/index.tsx index 3c6b6a73..6c79f4f3 100644 --- a/templates/cloudflare-worker/src/index.tsx +++ b/templates/cloudflare-worker/src/index.tsx @@ -6,6 +6,7 @@ import { serveStatic } from 'frog/serve-static' export const app = new Frog({ // Supply a Hub to enable frame verification. // hub: neynar({ apiKey: 'NEYNAR_FROG_FM' }) + title: 'Frog Frame', }) app.frame('/', (c) => { diff --git a/templates/default/src/index.tsx b/templates/default/src/index.tsx index 49909b7c..7d3eb0a8 100644 --- a/templates/default/src/index.tsx +++ b/templates/default/src/index.tsx @@ -6,6 +6,7 @@ import { devtools } from 'frog/dev' export const app = new Frog({ // Supply a Hub to enable frame verification. // hub: neynar({ apiKey: 'NEYNAR_FROG_FM' }) + title: 'Frog Frame', }) app.use('/*', serveStatic({ root: './public' })) diff --git a/templates/next/app/api/[[...routes]]/route.tsx b/templates/next/app/api/[[...routes]]/route.tsx index f143f304..2d4ebd40 100644 --- a/templates/next/app/api/[[...routes]]/route.tsx +++ b/templates/next/app/api/[[...routes]]/route.tsx @@ -11,6 +11,7 @@ const app = new Frog({ basePath: '/api', // Supply a Hub to enable frame verification. // hub: neynar({ apiKey: 'NEYNAR_FROG_FM' }) + title: 'Frog Frame', }) // Uncomment to use Edge Runtime diff --git a/templates/node/src/index.tsx b/templates/node/src/index.tsx index 8dfcf3a3..071c5faf 100644 --- a/templates/node/src/index.tsx +++ b/templates/node/src/index.tsx @@ -7,6 +7,7 @@ import { devtools } from 'frog/dev' export const app = new Frog({ // Supply a Hub to enable frame verification. // hub: neynar({ apiKey: 'NEYNAR_FROG_FM' }) + title: 'Frog Frame', }) app.use('/*', serveStatic({ root: './public' })) diff --git a/templates/vercel/api/index.tsx b/templates/vercel/api/index.tsx index ced9d7a1..7b1ffa37 100644 --- a/templates/vercel/api/index.tsx +++ b/templates/vercel/api/index.tsx @@ -14,6 +14,7 @@ export const app = new Frog({ basePath: '/api', // Supply a Hub to enable frame verification. // hub: neynar({ apiKey: 'NEYNAR_FROG_FM' }) + title: 'Frog Frame', }) app.frame('/', (c) => {