Added all the strings in locale file for gb.
This commit is contained in:
1 parent
6ba52156b8
commit
17dcdfcb06
2 files changed
+8
-4
No files matched your search
@@ -2,11 +2,13 @@ import { useState } from "react";
|
||||
import { networkService } from "../main";
|
||||
import { useSelector } from "react-redux";
|
||||
import { createToast } from "../Utils/toastUtils";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
const useSendTestEmail = () => {
|
||||
const [isSending, setIsSending] = useState(false);
|
||||
const [error, setError] = useState(null);
|
||||
const user = useSelector((state) => state.auth.user);
|
||||
const { t } = useTranslation();
|
||||
|
||||
const sendTestEmail = async () => {
|
||||
try {
|
||||
@@ -16,14 +18,14 @@ const useSendTestEmail = () => {
|
||||
const response = await networkService.sendTestEmail({ to: user.email });
|
||||
if (typeof response?.data?.data?.messageId !== "undefined") {
|
||||
createToast({
|
||||
body: "Test email sent successfully",
|
||||
body: t("emailSent"),
|
||||
});
|
||||
} else {
|
||||
throw new Error("Failed to send test email");
|
||||
throw new Error(t("failedToSendEmail"));
|
||||
}
|
||||
} catch (error) {
|
||||
createToast({
|
||||
body: "Failed to send test email",
|
||||
body: t("failedToSendEmail"),
|
||||
});
|
||||
setError(error);
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user