diff --git a/nepalingo-web/src/hooks/Auth.tsx b/nepalingo-web/src/hooks/Auth.tsx index c7e0321..88d309d 100644 --- a/nepalingo-web/src/hooks/Auth.tsx +++ b/nepalingo-web/src/hooks/Auth.tsx @@ -27,8 +27,7 @@ const AuthContext = createContext({ signIn: (data) => supabaseClient.auth.signInWithPassword(data), resetPasswordEmail: (email) => supabaseClient.auth.resetPasswordForEmail(email, { - //redirectTo: "https://www.nepalingo.com/reset-password", - redirectTo: "http://localhost:5173/reset-password", + redirectTo: "https://www.nepalingo.com/reset-password", }), }); @@ -72,8 +71,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => { signIn: (data) => supabaseClient.auth.signInWithPassword(data), resetPasswordEmail: (email) => supabaseClient.auth.resetPasswordForEmail(email, { - //redirectTo: "https://www.nepalingo.com/reset-password", - redirectTo: "http://localhost:5173/reset-password", + redirectTo: "https://www.nepalingo.com/reset-password", }), }; diff --git a/nepalingo-web/src/hooks/Langauge.tsx b/nepalingo-web/src/hooks/Langauge.tsx index 6addbb5..c5c9de2 100644 --- a/nepalingo-web/src/hooks/Langauge.tsx +++ b/nepalingo-web/src/hooks/Langauge.tsx @@ -10,6 +10,8 @@ export const Languages = { Newari: "newari", Tajpuriya: "tajpuriya", Maithili: "maithili", + Sanskrit: "sanskrit", + Nepali: "nepali", } as const; type LanguageContextProps = { diff --git a/nepalingo-web/src/hooks/useDictionary.tsx b/nepalingo-web/src/hooks/useDictionary.tsx index 68d73b1..80fca79 100644 --- a/nepalingo-web/src/hooks/useDictionary.tsx +++ b/nepalingo-web/src/hooks/useDictionary.tsx @@ -45,6 +45,10 @@ async function getFetcherByLanguage( return await getTajpuriyaWord(word); case "Maithili": return await getGTranslate("maithili", word); + case "Sanskrit": + return await getGTranslate("sanskrit", word); + case "Nepali": + return await getGTranslate("nepali", word); default: throw new Error(`Language ${language} not supported`); diff --git a/nepalingo-web/src/lib/getGTranslate.tsx b/nepalingo-web/src/lib/getGTranslate.tsx index 31c5157..201ab96 100644 --- a/nepalingo-web/src/lib/getGTranslate.tsx +++ b/nepalingo-web/src/lib/getGTranslate.tsx @@ -4,6 +4,8 @@ const GOOGLE_TRANSLATE_API_KEY = import.meta.env.VITE_GOOGLE_TRANSLATE_API_KEY; const languageCodes: { [key: string]: string } = { maithili: "mai", + sanskrit: "sa", + nepali: "ne", }; export const getGTranslate = async ( diff --git a/nepalingo-web/src/lib/getNextWord.ts b/nepalingo-web/src/lib/getNextWord.ts index 98b0740..b5ce530 100644 --- a/nepalingo-web/src/lib/getNextWord.ts +++ b/nepalingo-web/src/lib/getNextWord.ts @@ -58,7 +58,12 @@ export function* wordGenerator(words: string[]) { export async function getNextWord(language: string) { let words: string[] = []; - if (language === "Newari" || language === "Maithili") { + if ( + language === "Newari" || + language === "Maithili" || + language === "Sanskrit" || + language === "Nepali" + ) { words = newariWords; } else if (language === "Tajpuriya") { words = await getTajpuriyaWords();