diff --git a/.changeset/gorgeous-birds-warn.md b/.changeset/gorgeous-birds-warn.md new file mode 100644 index 0000000000..97aad33cc5 --- /dev/null +++ b/.changeset/gorgeous-birds-warn.md @@ -0,0 +1,5 @@ +--- +"@blitzjs/generator": patch +--- + +Add `BlitzPage` types to auth pages in new app template diff --git a/apps/toolkit-app/pages/auth/forgot-password.tsx b/apps/toolkit-app/pages/auth/forgot-password.tsx index 758e96f227..bb5ba6381c 100644 --- a/apps/toolkit-app/pages/auth/forgot-password.tsx +++ b/apps/toolkit-app/pages/auth/forgot-password.tsx @@ -4,8 +4,9 @@ import { Form, FORM_ERROR } from "app/core/components/Form" import { ForgotPassword } from "app/auth/validations" import forgotPassword from "app/auth/mutations/forgotPassword" import { useMutation } from "@blitzjs/rpc" +import { BlitzPage } from "@blitzjs/next" -const ForgotPasswordPage = () => { +const ForgotPasswordPage: BlitzPage = () => { const [forgotPasswordMutation, { isSuccess }] = useMutation(forgotPassword) return ( diff --git a/apps/toolkit-app/pages/auth/login.tsx b/apps/toolkit-app/pages/auth/login.tsx index 8d10a518e4..cb5e672110 100644 --- a/apps/toolkit-app/pages/auth/login.tsx +++ b/apps/toolkit-app/pages/auth/login.tsx @@ -1,8 +1,9 @@ import Layout from "app/core/layouts/Layout" import { LoginForm } from "app/auth/components/LoginForm" import { useRouter } from "next/router" +import { BlitzPage } from "@blitzjs/next" -const LoginPage = () => { +const LoginPage: BlitzPage = () => { const router = useRouter() return ( diff --git a/apps/toolkit-app/pages/auth/signup.tsx b/apps/toolkit-app/pages/auth/signup.tsx index 7f05f946b1..68fe2a7109 100644 --- a/apps/toolkit-app/pages/auth/signup.tsx +++ b/apps/toolkit-app/pages/auth/signup.tsx @@ -1,9 +1,9 @@ import { useRouter } from "next/router" import Layout from "app/core/layouts/Layout" import { SignupForm } from "app/auth/components/SignupForm" -import { Routes } from "@blitzjs/next" +import { BlitzPage, Routes } from "@blitzjs/next" -const SignupPage = () => { +const SignupPage: BlitzPage = () => { const router = useRouter() return ( diff --git a/packages/generator/templates/app/pages/auth/forgot-password.tsx b/packages/generator/templates/app/pages/auth/forgot-password.tsx index 758e96f227..bb5ba6381c 100644 --- a/packages/generator/templates/app/pages/auth/forgot-password.tsx +++ b/packages/generator/templates/app/pages/auth/forgot-password.tsx @@ -4,8 +4,9 @@ import { Form, FORM_ERROR } from "app/core/components/Form" import { ForgotPassword } from "app/auth/validations" import forgotPassword from "app/auth/mutations/forgotPassword" import { useMutation } from "@blitzjs/rpc" +import { BlitzPage } from "@blitzjs/next" -const ForgotPasswordPage = () => { +const ForgotPasswordPage: BlitzPage = () => { const [forgotPasswordMutation, { isSuccess }] = useMutation(forgotPassword) return ( diff --git a/packages/generator/templates/app/pages/auth/login.tsx b/packages/generator/templates/app/pages/auth/login.tsx index 8d10a518e4..9d9a388410 100644 --- a/packages/generator/templates/app/pages/auth/login.tsx +++ b/packages/generator/templates/app/pages/auth/login.tsx @@ -1,8 +1,9 @@ +import { BlitzPage } from "@blitzjs/next" import Layout from "app/core/layouts/Layout" import { LoginForm } from "app/auth/components/LoginForm" import { useRouter } from "next/router" -const LoginPage = () => { +const LoginPage: BlitzPage = () => { const router = useRouter() return ( diff --git a/packages/generator/templates/app/pages/auth/signup.tsx b/packages/generator/templates/app/pages/auth/signup.tsx index 7f05f946b1..68fe2a7109 100644 --- a/packages/generator/templates/app/pages/auth/signup.tsx +++ b/packages/generator/templates/app/pages/auth/signup.tsx @@ -1,9 +1,9 @@ import { useRouter } from "next/router" import Layout from "app/core/layouts/Layout" import { SignupForm } from "app/auth/components/SignupForm" -import { Routes } from "@blitzjs/next" +import { BlitzPage, Routes } from "@blitzjs/next" -const SignupPage = () => { +const SignupPage: BlitzPage = () => { const router = useRouter() return (