11import { zodResolver } from "@hookform/resolvers/zod"
22import { useMutation } from "@tanstack/react-query"
3- import { createFileRoute , Link as RouterLink , redirect , useNavigate } from "@tanstack/react-router"
3+ import {
4+ createFileRoute ,
5+ Link as RouterLink ,
6+ redirect ,
7+ useNavigate ,
8+ } from "@tanstack/react-router"
49import { useForm } from "react-hook-form"
510import { z } from "zod"
611
712import { LoginService } from "@/client"
8- import { isLoggedIn } from "@/hooks/useAuth"
9- import useCustomToast from "@/hooks/useCustomToast"
10- import { handleError } from "@/utils"
1113import { AuthLayout } from "@/components/Common/AuthLayout"
12- import { LoadingButton } from "@/components/ui/loading-button"
13- import { PasswordInput } from "@/components/ui/password-input"
1414import {
1515 Form ,
1616 FormControl ,
@@ -19,6 +19,11 @@ import {
1919 FormLabel ,
2020 FormMessage ,
2121} from "@/components/ui/form"
22+ import { LoadingButton } from "@/components/ui/loading-button"
23+ import { PasswordInput } from "@/components/ui/password-input"
24+ import { isLoggedIn } from "@/hooks/useAuth"
25+ import useCustomToast from "@/hooks/useCustomToast"
26+ import { handleError } from "@/utils"
2227
2328const searchSchema = z . object ( {
2429 token : z . string ( ) . catch ( "" ) ,
@@ -30,7 +35,9 @@ const formSchema = z
3035 . string ( )
3136 . min ( 1 , { message : "Password is required" } )
3237 . min ( 8 , { message : "Password must be at least 8 characters" } ) ,
33- confirm_password : z . string ( ) . min ( 1 , { message : "Password confirmation is required" } ) ,
38+ confirm_password : z
39+ . string ( )
40+ . min ( 1 , { message : "Password confirmation is required" } ) ,
3441 } )
3542 . refine ( ( data ) => data . new_password === data . confirm_password , {
3643 message : "The passwords don't match" ,
0 commit comments