- implement disable_email_auth env var

- add sync crowdin translations github action
This commit is contained in:
Amruth Pillai
2023-11-21 09:44:37 +01:00
parent 635f743e56
commit 1825fc3283
84 changed files with 2693 additions and 2341 deletions

View File

@ -0,0 +1,24 @@
import { AuthProvidersDto } from "@reactive-resume/dto";
import { useQuery } from "@tanstack/react-query";
import { AUTH_PROVIDERS_KEY } from "@/client/constants/query-keys";
import { axios } from "@/client/libs/axios";
export const getAuthProviders = async () => {
const response = await axios.get<AuthProvidersDto>(`/auth/providers`);
return response.data;
};
export const useAuthProviders = () => {
const {
error,
isPending: loading,
data: providers,
} = useQuery({
queryKey: [AUTH_PROVIDERS_KEY],
queryFn: getAuthProviders,
});
return { providers, loading, error };
};