feat: use i18next

This commit is contained in:
Steven
2022-09-19 22:27:50 +08:00
parent 307483e499
commit 366afdd1e4
39 changed files with 133 additions and 232 deletions

View File

@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react";
import { isEmpty } from "lodash-es";
import useI18n from "../../hooks/useI18n";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { userService } from "../../services";
import { useAppSelector } from "../../store";
import * as api from "../../helpers/api";
@ -15,7 +15,7 @@ interface State {
}
const PreferencesSection = () => {
const { t } = useI18n();
const { t } = useTranslation();
const currentUser = useAppSelector((state) => state.user.user);
const [state, setState] = useState<State>({
createUserEmail: "",