chore: i18n in toast

This commit is contained in:
Tristan Yang
2023-01-19 08:39:57 +08:00
parent 1f7baef4b6
commit fd8c54e702
34 changed files with 107 additions and 86 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ const Index = () => {
const [updateUrl, { isLoading, isSuccess }] = useUpdateFrontendUrlMutation();
useEffect(() => {
if (isSuccess) {
toast.success("Update Successfully!");
toast.success(ct("tip.update"));
}
}, [isSuccess]);
useEffect(() => {
+2 -1
View File
@@ -12,6 +12,7 @@ import { useAppSelector } from '../../../app/store';
const Index = () => {
const { t } = useTranslation("setting");
const { t: ct } = useTranslation();
const { loginUser, server } = useAppSelector((store) => {
return { loginUser: store.authData.user, server: store.server };
});
@@ -42,7 +43,7 @@ const Index = () => {
}, [server]);
useEffect(() => {
if (uploadSuccess) {
toast.success("Update logo successfully!");
toast.success(ct("tip.update"));
}
}, [uploadSuccess]);
useEffect(() => {