()
| 20 | * fallback is the user-facing retry surface. |
| 21 | */ |
| 22 | export function useMe(): UseQueryResult<IMe | null> { |
| 23 | return useQuery<IMe | null>({ |
| 24 | queryKey: AUTH_QUERY_KEYS.me, |
| 25 | queryFn: async () => { |
| 26 | const { data } = await apiClient.GET("/api/v1/users/me"); |
| 27 | |
| 28 | return isAuthenticatedMe(data) ? data : null; |
| 29 | }, |
| 30 | staleTime: 60_000, |
| 31 | retry: false |
| 32 | }); |
| 33 | } |
| 34 | |
| 35 | export function useMfaStatus(): UseQueryResult<IMfaStatusResponse | null> { |
| 36 | return useQuery<IMfaStatusResponse | null>({ |
no test coverage detected