Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove getLayout for reset-password.tsxs #4017

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/odd-mirrors-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"toolkit-app": patch
"toolkit-app-passport": patch
Comment on lines +2 to +3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"toolkit-app": patch
"toolkit-app-passport": patch

"@blitzjs/generator": patch
---

reset-password: Move `<Layout>` inside component (was using `.getLayout`)
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ResetPasswordPage: BlitzPage = () => {
const [resetPasswordMutation, { isSuccess }] = useMutation(resetPassword)

return (
<div>
<Layout title="Reset Your Password">
<h1>Set a New Password</h1>

{isSuccess ? (
Expand Down Expand Up @@ -56,11 +56,10 @@ const ResetPasswordPage: BlitzPage = () => {
/>
</Form>
)}
</div>
</Layout>
)
}

ResetPasswordPage.redirectAuthenticatedTo = "/"
ResetPasswordPage.getLayout = (page) => <Layout title="Reset Your Password">{page}</Layout>

export default ResetPasswordPage
5 changes: 2 additions & 3 deletions apps/toolkit-app/src/pages/auth/reset-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ResetPasswordPage: BlitzPage = () => {
}, [router.isReady])

return (
<div>
<Layout title="Reset Your Password">
<h1>Set a New Password</h1>

{isSuccess ? (
Expand Down Expand Up @@ -62,11 +62,10 @@ const ResetPasswordPage: BlitzPage = () => {
/>
</Form>
)}
</div>
</Layout>
)
}

ResetPasswordPage.redirectAuthenticatedTo = "/"
ResetPasswordPage.getLayout = (page) => <Layout title="Reset Your Password">{page}</Layout>

export default ResetPasswordPage
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const ResetPasswordPage: BlitzPage = () => {
}, [router.isReady])

return (
<div>
<Layout title="Reset Your Password">
<h1>Set a New Password</h1>

{isSuccess ? (
Expand Down Expand Up @@ -62,11 +62,10 @@ const ResetPasswordPage: BlitzPage = () => {
/>
</Form>
)}
</div>
</Layout>
)
}

ResetPasswordPage.redirectAuthenticatedTo = "/"
ResetPasswordPage.getLayout = (page) => <Layout title="Reset Your Password">{page}</Layout>

export default ResetPasswordPage
Loading