mirror of
https://github.com/docmost/docmost.git
synced 2025-11-14 11:31:10 +10:00
fix: refactor forgot password system (#329)
* refactor forgot password system * ready
This commit is contained in:
14
apps/client/src/features/auth/queries/auth-query.tsx
Normal file
14
apps/client/src/features/auth/queries/auth-query.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import { useQuery, UseQueryResult } from "@tanstack/react-query";
|
||||
import { verifyUserToken } from "../services/auth-service";
|
||||
import { IVerifyUserToken } from "../types/auth.types";
|
||||
|
||||
export function useVerifyUserTokenQuery(
|
||||
verify: IVerifyUserToken,
|
||||
): UseQueryResult<any, Error> {
|
||||
return useQuery({
|
||||
queryKey: ["verify-token", verify],
|
||||
queryFn: () => verifyUserToken(verify),
|
||||
enabled: !!verify.token,
|
||||
staleTime: 0,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user