feat: add typescript support to i18next

This commit is contained in:
Tristan Yang
2022-11-25 11:28:00 +08:00
parent 79832fefe3
commit 48a529e5d6
25 changed files with 136 additions and 54 deletions
-2
View File
@@ -1,5 +1,4 @@
// import React from 'react'
import dayjs from 'dayjs';
import { useTranslation } from 'react-i18next';
import StyledRadio from "../../../common/component/styled/Radio";
@@ -9,7 +8,6 @@ const Index = () => {
const { t, i18n } = useTranslation("setting");
const handleGuestToggle = (v: "zh" | "en") => {
i18n.changeLanguage(v);
dayjs.locale(v === "zh" ? "zh-cn" : "en");
};
return (
<div className="setting">