diff --git a/.changeset/chilled-carrots-own.md b/.changeset/chilled-carrots-own.md new file mode 100644 index 0000000000..e5846ccd72 --- /dev/null +++ b/.changeset/chilled-carrots-own.md @@ -0,0 +1,5 @@ +--- +"@blitzjs/generator": patch +--- + +Add `BlitzPage` type to Home pages in app templates diff --git a/apps/toolkit-app/pages/index.tsx b/apps/toolkit-app/pages/index.tsx index 8427dfeb5d..d08d66a9bd 100644 --- a/apps/toolkit-app/pages/index.tsx +++ b/apps/toolkit-app/pages/index.tsx @@ -6,7 +6,7 @@ import { useCurrentUser } from "app/core/hooks/useCurrentUser" import logout from "app/auth/mutations/logout" import logo from "public/logo.png" import { useMutation } from "@blitzjs/rpc" -import { Routes } from "@blitzjs/next" +import { Routes, BlitzPage } from "@blitzjs/next" /* * This file is just for a pleasant getting started page for your new app. @@ -53,7 +53,7 @@ const UserInfo = () => { } } -const Home = () => { +const Home: BlitzPage = () => { return (
diff --git a/packages/generator/templates/app/pages/index.tsx b/packages/generator/templates/app/pages/index.tsx index b35155bdc1..3d86a580d2 100644 --- a/packages/generator/templates/app/pages/index.tsx +++ b/packages/generator/templates/app/pages/index.tsx @@ -6,7 +6,7 @@ import { useCurrentUser } from "app/core/hooks/useCurrentUser" import logout from "app/auth/mutations/logout" import logo from "public/logo.png" import { useMutation } from "@blitzjs/rpc" -import { Routes } from "@blitzjs/next" +import { Routes, BlitzPage } from "@blitzjs/next" /* * This file is just for a pleasant getting started page for your new app. @@ -53,7 +53,7 @@ const UserInfo = () => { } } -const Home = () => { +const Home: BlitzPage = () => { return (
diff --git a/packages/generator/templates/minimalapp/pages/index.tsx b/packages/generator/templates/minimalapp/pages/index.tsx index d190c0e1e8..0b80902aef 100644 --- a/packages/generator/templates/minimalapp/pages/index.tsx +++ b/packages/generator/templates/minimalapp/pages/index.tsx @@ -1,5 +1,5 @@ import Image from 'next/image' -import { NextPage } from "next" +import { BlitzPage } from "@blitzjs/next" import logo from "public/logo.png" /* @@ -7,7 +7,7 @@ import logo from "public/logo.png" * You can delete everything in here and start from scratch if you like. */ -const Home: NextPage = () => { +const Home: BlitzPage = () => { return (