feat: test result

This commit is contained in:
2025-09-30 09:52:28 +08:00
parent 288b845270
commit 9fef267cf6
7 changed files with 386 additions and 16 deletions

View File

@@ -14,9 +14,11 @@ export interface UserState {
export const useUser = create<UserState>()((set) => ({
user: {},
fetchUserInfo: async () => {
const res = await fetchUserProfile();
console.log(res);
set({ user: res.data });
try {
const res = await fetchUserProfile();
console.log(res);
set({ user: res.data });
} catch {}
},
updateUserInfo: async (userInfo: Partial<UserInfoType>) => {
const res = await updateUserProfile(userInfo);