feat: submit new password to backend and submit user information and add Form to UserSettingProfile (#114)

* feat: add Form to UserSettingProfile

* feat: submit user information

* feat: submit new password to backend
This commit is contained in:
balibabu
2024-03-08 17:09:07 +08:00
committed by GitHub
parent 8f86ab9f7f
commit fa171dfe6c
15 changed files with 880 additions and 32 deletions

View File

@ -74,3 +74,16 @@ export const useLogout = () => {
return logout;
};
export const useSaveSetting = () => {
const dispatch = useDispatch();
const saveSetting = useCallback(
(userInfo: { new_password: string } | IUserInfo): number => {
return dispatch<any>({ type: 'settingModel/setting', payload: userInfo });
},
[dispatch],
);
return saveSetting;
};