- 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 };
};

View File

@ -1,6 +1,7 @@
import { Language } from "@reactive-resume/utils";
import { useQuery } from "@tanstack/react-query";
import { LANGUAGES_KEY } from "@/client/constants/query-keys";
import { axios } from "@/client/libs/axios";
export const fetchLanguages = async () => {
@ -15,7 +16,7 @@ export const useLanguages = () => {
isPending: loading,
data: languages,
} = useQuery({
queryKey: ["translation", "languages"],
queryKey: [LANGUAGES_KEY],
queryFn: fetchLanguages,
});