feat: 生成分享图
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
|
||||
export interface UserState {
|
||||
user: UserInfoType | {};
|
||||
fetchUserInfo: () => Promise<void>;
|
||||
fetchUserInfo: () => Promise<UserInfoType | undefined>;
|
||||
updateUserInfo: (userInfo: Partial<UserInfoType>) => void;
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@ export const useUser = create<UserState>()((set) => ({
|
||||
fetchUserInfo: async () => {
|
||||
try {
|
||||
const res = await fetchUserProfile();
|
||||
console.log(res);
|
||||
set({ user: res.data });
|
||||
} catch {}
|
||||
return res.data
|
||||
} catch { }
|
||||
},
|
||||
updateUserInfo: async (userInfo: Partial<UserInfoType>) => {
|
||||
const res = await updateUserProfile(userInfo);
|
||||
|
||||
Reference in New Issue
Block a user