mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
using formik on profile settings
This commit is contained in:
parent
3c0571816c
commit
e8f0ec1f36
5 changed files with 106 additions and 75 deletions
|
@ -1,5 +1,5 @@
|
|||
import { createContext, FC, useCallback, useContext } from "react";
|
||||
import { IUser } from "~/redux/auth/types";
|
||||
import { ApiUpdateUserRequest, IUser } from "~/redux/auth/types";
|
||||
import { useGetProfile } from "~/hooks/profile/useGetProfile";
|
||||
import { EMPTY_USER } from "~/redux/auth/constants";
|
||||
import { usePatchProfile } from "~/hooks/profile/usePatchProfile";
|
||||
|
@ -15,7 +15,7 @@ interface ProfileContextValue {
|
|||
profile: IUser;
|
||||
isLoading: boolean;
|
||||
updatePhoto: (file: File) => Promise<unknown>;
|
||||
updateProfile: (user: Partial<IUser>) => Promise<IUser>;
|
||||
updateProfile: (user: Partial<ApiUpdateUserRequest['user']>) => Promise<IUser>;
|
||||
}
|
||||
|
||||
const ProfileContext = createContext<ProfileContextValue>({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue