diff --git a/src/pages/SignIn.tsx b/src/pages/SignIn.tsx index be23e42..e64244c 100644 --- a/src/pages/SignIn.tsx +++ b/src/pages/SignIn.tsx @@ -11,6 +11,7 @@ import { useNavigate } from "react-router-dom"; import useUserStore from "../store/user.ts"; import { Popover } from "antd-mobile"; import EmailForm from "../components/EmailForm.tsx"; +import Area from "../i18n/area/area.json"; function SignIn() { const { t, i18n } = useTranslation(); @@ -20,7 +21,7 @@ function SignIn() { const [selectIndex, setSelectIndex] = useState(1); const { previousPathName, UpdatePreviousPathName } = useUserStore(); const navigate = useNavigate(); - const { UpdateLang } = useUserStore(); + const { UpdateLang, UpdateSelectCountry } = useUserStore(); const handleTabs = (num: number) => { return () => { UpdatePreviousPathName("/"); @@ -72,6 +73,8 @@ function SignIn() { i18n.changeLanguage("cn"); setVisible(false); UpdateLang("zh-TW"); + const areaItem = Area.find((v) => v.code == "+86"); + if (areaItem) UpdateSelectCountry(areaItem); }} > 中文(繁体)