chore: remove v1 prefix in store name

This commit is contained in:
Steven
2023-12-23 08:48:11 +08:00
parent df3303dcd3
commit df5aeb6d88
26 changed files with 132 additions and 130 deletions

View File

@ -9,14 +9,14 @@ import { absolutifyLink } from "@/helpers/utils";
import useLoading from "@/hooks/useLoading";
import useNavigateTo from "@/hooks/useNavigateTo";
import { useGlobalStore } from "@/store/module";
import { useUserV1Store } from "@/store/v1";
import { useUserStore } from "@/store/v1";
import { useTranslate } from "@/utils/i18n";
const SignIn = () => {
const t = useTranslate();
const navigateTo = useNavigateTo();
const globalStore = useGlobalStore();
const userV1Store = useUserV1Store();
const userStore = useUserStore();
const actionBtnLoadingState = useLoading(false);
const { appearance, locale, systemStatus } = globalStore.state;
const mode = systemStatus.profile.mode;
@ -77,7 +77,7 @@ const SignIn = () => {
actionBtnLoadingState.setLoading();
const { data: user } = await api.signin(username, password, remember);
if (user) {
await userV1Store.fetchCurrentUser();
await userStore.fetchCurrentUser();
navigateTo("/");
} else {
toast.error(t("message.login-failed"));