🆙 Update React Query to TanStack Query (#1153)
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
} from "@chakra-ui/react"
|
||||
import { createFileRoute, redirect, useNavigate } from "@tanstack/react-router"
|
||||
import { type SubmitHandler, useForm } from "react-hook-form"
|
||||
import { useMutation } from "react-query"
|
||||
import { useMutation } from "@tanstack/react-query"
|
||||
|
||||
import { type ApiError, LoginService, type NewPassword } from "../client"
|
||||
import { isLoggedIn } from "../hooks/useAuth"
|
||||
@@ -57,7 +57,8 @@ function ResetPassword() {
|
||||
})
|
||||
}
|
||||
|
||||
const mutation = useMutation(resetPassword, {
|
||||
const mutation = useMutation({
|
||||
mutationFn: resetPassword,
|
||||
onSuccess: () => {
|
||||
showToast("Success!", "Password updated.", "success")
|
||||
reset()
|
||||
|
Reference in New Issue
Block a user