B: Do not revalidate auth on password reset
This commit is contained in:
parent
c666f2b41a
commit
a9d8193e2a
|
@ -1,18 +1,15 @@
|
|||
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
|
||||
import { authApi, IPasswordTokenDTO, IResetPasswordDTO } from './api';
|
||||
|
||||
export const useResetPassword = () => {
|
||||
const client = useQueryClient();
|
||||
const validateMutation = useMutation({
|
||||
mutationKey: ['reset-password'],
|
||||
mutationFn: authApi.validatePasswordToken,
|
||||
onSuccess: () => client.invalidateQueries({ queryKey: [authApi.baseKey] })
|
||||
mutationFn: authApi.validatePasswordToken
|
||||
});
|
||||
const resetMutation = useMutation({
|
||||
mutationKey: ['reset-password'],
|
||||
mutationFn: authApi.resetPassword,
|
||||
onSuccess: () => client.invalidateQueries({ queryKey: [authApi.baseKey] })
|
||||
mutationFn: authApi.resetPassword
|
||||
});
|
||||
return {
|
||||
validateToken: (
|
||||
|
|
Loading…
Reference in New Issue
Block a user