diff --git a/packages/cli/src/commands/generate/dbAuth/templates/resetPassword.tsx.template b/packages/cli/src/commands/generate/dbAuth/templates/resetPassword.tsx.template index 55a9fcb8f3ce..b1ffcc7827dd 100644 --- a/packages/cli/src/commands/generate/dbAuth/templates/resetPassword.tsx.template +++ b/packages/cli/src/commands/generate/dbAuth/templates/resetPassword.tsx.template @@ -1,8 +1,6 @@ import { useEffect, useRef, useState } from 'react' + import { useAuth } from '@redwoodjs/auth' -import { navigate, routes } from '@redwoodjs/router' -import { MetaTags } from '@redwoodjs/web' -import { toast, Toaster } from '@redwoodjs/web/toast' import { Form, Label, @@ -10,9 +8,14 @@ import { Submit, FieldError, } from '@redwoodjs/forms' +import { navigate, routes } from '@redwoodjs/router' +import { MetaTags } from '@redwoodjs/web' +import { toast, Toaster } from '@redwoodjs/web/toast' + +const ResetPasswordPage = ({ resetToken }: { resetToken: string }) => { + const { isAuthenticated, reauthenticate, validateResetToken, resetPassword } = + useAuth() -const ResetPasswordPage = ({ resetToken }) => { - const { isAuthenticated, reauthenticate, validateResetToken, resetPassword } = useAuth() const [enabled, setEnabled] = useState(true) useEffect(() => {